Skip to content

Instantly share code, notes, and snippets.

@adamdilek
Last active December 17, 2015 13:49
Show Gist options
  • Select an option

  • Save adamdilek/5620173 to your computer and use it in GitHub Desktop.

Select an option

Save adamdilek/5620173 to your computer and use it in GitHub Desktop.
form.html.haml
= f.select :suburb_town_region_country_id_eq, @countries.map{|country| [country.name, country.id]}, {}, :id => 'country'
= f.select :suburb_town_region_id_eq, @regions.map{|region| [region.name, region.id]}, {}, :id => 'region'
= f.select :suburb_town_id_eq, @towns.map{|town| [town.name, town.id]}, {}, :id => 'town'
= f.select :suburb_id_eq, @suburbs.map{|suburb| [suburb.name, suburb.id]}, {}, :id => 'suburb'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment