1
0
Fork 0
forked from OpenNeo/impress

use item proxies in items#index when given item IDs

This commit is contained in:
Emi Matchu 2013-06-27 00:15:20 -07:00
parent 5b9394ce82
commit b92131b26c

View file

@ -33,8 +33,9 @@ class ItemsController < ApplicationController
end
end
elsif params.has_key?(:ids) && params[:ids].is_a?(Array)
@items = Item.includes(:translations).find(params[:ids])
@items = Item.build_proxies(params[:ids])
assign_closeted!
@items.prepare_method(:as_json)
respond_to do |format|
format.json { render json: @items }
end