Class: Gemgento::AddressesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/gemgento/addresses_controller.rb

Instance Method Summary collapse

Instance Method Details

#region_optionsObject



7
8
9
10
11
12
# File 'app/controllers/gemgento/addresses_controller.rb', line 7

def region_options
  country = Country.find(params[:country_id])
  @regions = Region.where(country: country).map { |r| [r.name, r.id] }

  respond_with @regions
end