Sha256: fadbd2a30a883f5973248d11204a6adacaf2ca4e01a2d2c561bc327bf58f21ec

Contents?: true

Size: 613 Bytes

Versions: 1

Compression:

Stored size: 613 Bytes

Contents

module ActionView
  module Helpers
    module FormOptionsHelper

      def state_options_for_select
        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)
      end

      def country_options_for_select
        geography = GeographyHelper::Countries.new
        geography.countries.invert
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
geography_helper-0.1.0 lib/geography_helper/form_options_helper.rb