https://github.com/plataformatec/simple_form
http://railscasts.com/episodes/234-simple-form-revised
# Gemfile
gem 'simple_form'
bundle
rails g simple_form:install --bootstrap
# app/views/blogs/_form.html.rb
<%= simple_form_for @blog, :html => { :class => 'form-horizontal' } do |f| %>
<%= f.input :name %>
<%= f.input :body, :input_html => { :rows => 6 } %>
<%= f.input :state,
:as => :radio_buttons,
:collection => ['SA', 'WA'],
:item_wrapper_class => 'inline' %>
<div class="form-actions">
<%= f.button :submit, :class => 'btn-primary' %>
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),
blogs_path, :class => 'btn' %>
</div>
<% end %>