Sha256: 25d76f9d2e9abf0fc8734c21fabd2841c1cc0eeee7c899e33c6bede580844e27

Contents?: true

Size: 1.75 KB

Versions: 1

Compression:

Stored size: 1.75 KB

Contents

= i18n_form_helper

i18n_form_helper adds FormBuilder Helpers for input select fields to ActionView::Helpers for ISO Language and Country Codes.

== Installation

Using Bundler, add the following to your Gemfile

  gem 'i18n_form_helper'

or manually via Ruby Gems:
  
  gem install i18n_form_helper

== Examples

The *language_name_select* options contain name pairs ['English', 'English']
  <%= form_for(Language.new) do |f| %>
    <%= f.label :name, "English Name to English Name" %>
    <%= f.language_name_select :name %>
  <% end %>

The *language_native_select* options contain native name pairs ['Norsk', 'Norsk']
  <%= form_for(Language.new) do |f| %>
    <%= f.label :name, "Native Name to Native Name" %>
    <%= f.language_native_select :name%>
  <% end %>

The *language_code_select* options contain code,native name pairs ['JA', 'にほんご']
  <%= form_for(Language.new) do |f| %>
    <%= f.label :name, "Language Code to Native Name" %>
    <%= f.language_code_select :name %>
  <% end %>

The *country_name_select* options contain name pairs ['Australia', 'Australia']
  <%= form_for(Country.new) do |f| %>
    <%= f.label :name, "English Country Name to English Country Name" %>
    <%= f.country_name_select :name %>
  <% end %>

The *country_code_select* options contain code,name pairs ['US', 'United States']
  <%= form_for(Country.new) do |f| %>
    <%= f.label :name, "Code to English Country Name" %>
    <%= f.country_code_select :name %>
  <% end %>

== Tests

Developed and Tested with *ruby-1.9.3* and *Rails* *3*

== Repo

Please fork, submit patches or feedback at https://github.com/mcelliott/i18n_form_helper

The gem details on RubyGems.org can be found at https://rubygems.org/gems/i18n_form_helper

== License

This project rocks and uses MIT-LICENSE.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
i18n_form_helper-0.0.2 README.rdoc