Skip to content

Commit

Permalink
update bootstrap v4.1 generator template (#1569)
Browse files Browse the repository at this point in the history
simple form now 💜 bootstrap 4.1

The bootstrap generator is extracted from:
heartcombo/simple_form-bootstrap#56

* supported form wrapper all covered by *tests*
  * vertical form
  * horizontal form
  * inline form
  * custom fields form
  * input groups form
  * floating labels form

:link: heartcombo/simple_form-bootstrap#56
🔗 #1561

Resolves #1337
  • Loading branch information
m5o authored and feliperenan committed Apr 11, 2018
1 parent d918f70 commit 1cb66eb
Show file tree
Hide file tree
Showing 3 changed files with 358 additions and 84 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Unreleased

* Add bootstrap v4.1 generator template. [@m5o](https://github.com/m5o)
* Add Rails 5.2 support. [@gobijan](https://github.com/gobijan)
* Add API to register custom components.[@feliperenan](https://github.com/feliperenan)
* Allow custom errors classes to inputs.[@feliperenan](https://github.com/feliperenan)
Expand All @@ -23,7 +24,7 @@
* Add frozen_string_literal magic comment to several files. [@oniofchaos](https://github.com/oniofchaos)
* Try convert @object to model in case we got decorated object [@timurvafin](https://github.com/timurvafin)
- From now, if you are using some object that inherits from `SimpleDelegator`, you must implement
`def to_model; self; end`. Otherwise, *Simple Form* will convert the decorated object to the model
`def to_model; self; end`. Otherwise, *Simple Form* will convert the decorated object to the model
since `SimpleDelegator` will delegate it to the model.
* Code cleanup [@Fornacula](https://github.com/Fornacula)

Expand Down
6 changes: 3 additions & 3 deletions lib/generators/simple_form/templates/README
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
Be sure to have a copy of the Bootstrap stylesheet available on your
application, you can get it on http://getbootstrap.com/.

Inside your views, use the 'simple_form_for' with one of the Bootstrap form
classes, '.form-horizontal' or '.form-inline', as the following:
Inside your views, use the 'simple_form_for' with the Bootstrap form
class, '.form-inline', as the following:

= simple_form_for(@user, html: { class: 'form-horizontal' }) do |form|
= simple_form_for(@user, html: { class: 'form-inline' }) do |form|

===============================================================================
Loading

0 comments on commit 1cb66eb

Please sign in to comment.