Sha256: 19c19c87a419f8b38264f4e0053a7eb36832feff5aeb11d96e046ecc79834fa9

Contents?: true

Size: 263 Bytes

Versions: 2

Compression:

Stored size: 263 Bytes

Contents

class RetailersController < Spree::BaseController

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

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_retailers-0.50.0.0 app/controllers/retailers_controller.rb
spree_retailers-0.40.0.4 app/controllers/retailers_controller.rb