Home: https://github.com/kikyous/easy_form
form builder without complex dsl
turn
<%= f.text_field, :title %>
into
<%= f.field :text_field, :title %>
as you see
field
is a proxy method that send method and args toActionView::Helpers::FormBuilder
instance, so you can write like this:<%= f.field :text_area, :title %>
output:
<div class="large-12 columns">
<label>* Title
<input type="text" value="" name="article[title]" id="article_title">
</label>
</div>
template above:
app/views/easy_form/_default.html.erb
<div class='row'>
<div class='large-12 columns'>
<label><%= '*' if required? %> <%= label_text %>
<%= input %>
</label>
</div>
</div>
or you can use a named template:
<%= f.field :text_field, :title, template: 'bootstrap' %>
or globally:
<%= form_for @article, template: 'bootstrap' %>
gem 'easy_form', github: 'kikyous/easy_form'
bundle
rails g easy_form:view