Sha256: ae8c6f2077573d1a972d26d2d8dc313f82701b44f2f2b1aa2e249cb6b72e3d37

Contents?: true

Size: 557 Bytes

Versions: 3

Compression:

Stored size: 557 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.paginate(:per_page => Spree::Config[:orders_per_page], :page => params[:page])
    end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spree_essentials-0.1.3 app/controllers/admin/uploads_controller.rb
spree_essentials-0.1.2 app/controllers/admin/uploads_controller.rb
spree_essentials-0.1.1 app/controllers/admin/uploads_controller.rb