Sha256: 349f19bb84d1b03cd4e9606ff8a9b0a79fc7f789f318d5323c834e8417036e81
Contents?: true
Size: 681 Bytes
Versions: 5
Compression:
Stored size: 681 Bytes
Contents
module ActionView module Helpers module FormOptionsHelper def state_options_for_select(selected=nil) geography = GeographyHelper::States.new state_options = geography.states province_options = geography.provinces state_and_province_options = {'United States' => state_options['United States'].invert}.merge({'Canada' => province_options['Canada'].invert}) grouped_options_for_select(state_and_province_options, selected) end def country_options_for_select(selected=nil) geography = GeographyHelper::Countries.new options_for_select(geography.countries.invert, selected) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems