Sha256: b199688f7d1881204c165f451fed2a4f862544412bb8af9786b254b2661eca6b

Contents?: true

Size: 1.68 KB

Versions: 17

Compression:

Stored size: 1.68 KB

Contents

EffectiveAddresses.setup do |config|
  # Database table name to store addresses in.  Default is :addresses
  config.addresses_table_name = :addresses

  # Display Full Name on Address forms, and validate presence by default
  # (can be overridden on a per address basis)
  config.use_full_name = true

  # Country codes to display in country_select dropdowns.
  config.country_codes = :all #
  #config.country_codes = ['US', 'CA'] # Or you can be more selective...

  # Select these countries ontop of the others
  config.country_codes_priority = ['US', 'CA'] # nil for no priority countries

  # Force this country to be preselected on any new address forms.
  # Valid values are: country code, country name, or nil.
  # Leave nil if using Geocoder for IP based discovery.
  config.pre_selected_country = nil

  # Force this state to be preselected on any new address forms.
  # Must also define pre_selected_country for this to take affect
  # Valid values are: state code, state name, or nil.
  # Leave nil if using Geocoder for IP based discovery.
  config.pre_selected_state = nil

  # Validate that the postal/zip code format is correct for these countries
  # Right now, only US and Canada are supported
  config.validate_postal_code_format = ['US', 'CA']

  # SimpleForm Options
  # This Hash of options will be passed into any simple_form_for() calls
  config.simple_form_options = {}

  # config.simple_form_options = {
  #   :html => {:class => 'form-horizontal'},
  #   :wrapper => :horizontal_form,
  #   :wrapper_mappings => {
  #     :boolean => :horizontal_boolean,
  #     :check_boxes => :horizontal_radio_and_checkboxes,
  #     :radio_buttons => :horizontal_radio_and_checkboxes
  #   }
  # }

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
effective_addresses-1.6.3 lib/generators/templates/effective_addresses.rb
effective_addresses-1.6.2 lib/generators/templates/effective_addresses.rb
effective_addresses-1.6.1 lib/generators/templates/effective_addresses.rb
effective_addresses-1.6.0 lib/generators/templates/effective_addresses.rb
effective_addresses-1.5.1 lib/generators/templates/effective_addresses.rb
effective_addresses-1.5.0 lib/generators/templates/effective_addresses.rb
effective_addresses-1.4.1 lib/generators/templates/effective_addresses.rb
effective_addresses-1.4.0 lib/generators/templates/effective_addresses.rb
effective_addresses-1.3.9 lib/generators/templates/effective_addresses.rb
effective_addresses-1.3.8 lib/generators/templates/effective_addresses.rb
effective_addresses-1.3.7 lib/generators/templates/effective_addresses.rb
effective_addresses-1.3.6 lib/generators/templates/effective_addresses.rb
effective_addresses-1.3.5 lib/generators/templates/effective_addresses.rb
effective_addresses-1.3.4 lib/generators/templates/effective_addresses.rb
effective_addresses-1.3.2 lib/generators/templates/effective_addresses.rb
effective_addresses-1.3.1 lib/generators/templates/effective_addresses.rb
effective_addresses-1.3.0 lib/generators/templates/effective_addresses.rb