Sha256: 5658edb736d1669c7c34801fd12bd6b1163fe7ca3eb07f7818bac277575ea942
Contents?: true
Size: 536 Bytes
Versions: 3
Compression:
Stored size: 536 Bytes
Contents
class Admin::UploadsController < Admin::ResourceController def index render :template => request.xhr? ? 'admin/uploads/picker' : 'admin/uploads/index', :layout => !request.xhr? end private def translated_object_name I18n.t("upload.model_name") end def collection params[:search] ||= {} params[:search][:meta_sort] ||= "created_at.desc" @search = Upload.metasearch(params[:search]) @collection = @search.page(params[:page]).per(Spree::Config[:orders_per_page]) end end
Version data entries
3 entries across 3 versions & 1 rubygems