Reformed
Better Rails 3+ and 4+ Form Builder with support for any CSS Framework. Natively supports Bootstrap 2 and 3, Zurb 3 and 4 via customization.
Installation
gem 'reformed'
Instructions
It's very easy to use, just do this
= reform_for do |f|
f.input :name
f.input :email
f.input :password
end
Customization
The best feature ever. Customization supports lambda
Reformed::FormBuilder.input_wrapper = lambda { |controls, |
"<div class=\"input-control\">#{controls[:label]} #{controls[:input]} #{controls[:error]} #{controls[:hint]}</div>"
}
Reformed::FormBuilder.label_wrapper = lambda { |controls, |
"<span>#{controls[:label]}</span>"
}
Reformed::FormBuilder.hint_wrapper = lambda { |, |
"<span class=\"hint\">#{}</span>"
}
Reformed::FormBuilder.error_wrapper = lambda { |, |
"<span class=\"error\">#{}</span>"
}
More examples to follow soon
HTML5
By default, Reformed will render your controls as html5, you can turn it off by doing the following
Reformed::FormBuilder.html5 = false
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
Contributors
Vixon - The Jason Torres and Victor Solis show.
License
MIT License