Class: Spree::RetailersController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/spree/retailers_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



3
4
5
6
7
8
9
# File 'app/controllers/spree/retailers_controller.rb', line 3

def index
  @retailers = Spree::Retailer.order(:country, :state, :name)
  @states = {}
  Spree::State.where(:abbr => @retailers.collect(&:state).uniq).all.each do |state|
    @states[state.abbr] = state.name
  end
end