Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change default generator classes to .form-inputs and .form-actions
Makes it easier to integrate with bootstrap. Related to #424
- Loading branch information
1 parent
04f70e8
commit 612c006
Showing
4 changed files
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,13 +1,13 @@ | |||
<%%= simple_form_for(@<%= singular_table_name %>) do |f| %> | <%%= simple_form_for(@<%= singular_table_name %>) do |f| %> | ||
<%%= f.error_notification %> | <%%= f.error_notification %> | ||
|
|
||
<div class="inputs"> | <div class="form-inputs"> | ||
<%- attributes.each do |attribute| -%> | <%- attributes.each do |attribute| -%> | ||
<%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %> | <%%= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> %> | ||
<%- end -%> | <%- end -%> | ||
</div> | </div> | ||
|
|
||
<div class="actions"> | <div class="form-actions"> | ||
<%%= f.button :submit %> | <%%= f.button :submit %> | ||
</div> | </div> | ||
<%% end %> | <%% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,10 +1,10 @@ | |||
= simple_form_for(@<%= singular_table_name %>) do |f| | = simple_form_for(@<%= singular_table_name %>) do |f| | ||
= f.error_notification | = f.error_notification | ||
|
|
||
.inputs | .form-inputs | ||
<%- attributes.each do |attribute| -%> | <%- attributes.each do |attribute| -%> | ||
= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> | = f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> | ||
<%- end -%> | <%- end -%> | ||
|
|
||
.actions | .form-actions | ||
= f.button :submit | = f.button :submit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,10 +1,10 @@ | |||
= simple_form_for(@<%= singular_table_name %>) do |f| | = simple_form_for(@<%= singular_table_name %>) do |f| | ||
= f.error_notification | = f.error_notification | ||
|
|
||
.inputs | .form-inputs | ||
<%- attributes.each do |attribute| -%> | <%- attributes.each do |attribute| -%> | ||
= f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> | = f.<%= attribute.reference? ? :association : :input %> :<%= attribute.name %> | ||
<%- end -%> | <%- end -%> | ||
|
|
||
.actions | .form-actions | ||
= f.button :submit | = f.button :submit |