Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (18 sloc) 0.802 kb

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.

Jump to Line
Something went wrong with that request. Please try again.