state select form options helper for formtastic
Pull request Compare This branch is even with liangzan:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
.document
.gitignore
LICENSE
README.rdoc
Rakefile
VERSION
formtastic_state_select.gemspec

README.rdoc

formtastic_state_select

Formtastic State Selects adds the :state input type in formtastic form builder

Installation

First install the state_select plugin github.com/sprsquish/state_select

then,

$ gem install formtastic_state_select

Usage

# default country is US
<%- semantic_form_for @billing, :url => account_billings_path(@account), :html => {:method => :post} do |f| %>

 <%- f.inputs :name => "Billing Info" do %>
   <%= f.input :first_name %>
   <%= f.input :last_name %>
   <%= f.input :address_line_1 %>
   <%= f.input :address_line_2 %>
   <%= f.input :city %>
   <%= f.input :state, :as => :state, :label => 'UK States', :country => 'UK', :input_html => 'foo' %>

Copyright

Copyright © 2010 Wong Liang Zan. See LICENSE for details.