Sha256: 15b74b844c057f781363639bf9e01ef3933e8a7af4067ca9084a6fb5ff08700d
Contents?: true
Size: 607 Bytes
Versions: 1
Compression:
Stored size: 607 Bytes
Contents
class Spree::Admin::RetailersController < Spree::Admin::ResourceController before_filter :get_locations, :except => [:index, :destroy] private def collection params[:search] ||= {} params[:search][:meta_sort] ||= "name.asc" @search = super.search(params[:search]) @collection = @search.page(params[:page]).per(Spree::Config[:orders_per_page]) end def get_locations @countries = Spree::Country.all.collect{|country| country.name }.sort @states = Spree::State.where(:country_id => 214).collect{|state| [state.name, state.abbr] }.sort end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spree_retailers-1.0.0.0 | app/controllers/spree/admin/retailers_controller.rb |