forked from psynix/rails3_haml_scaffold_generator
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated all scaffold related views so it uses I18n.
- Loading branch information
1 parent
911c229
commit 525f191
Showing
5 changed files
with
28 additions
and
24 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 | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
%h1 Editing <%= singular_name %> | ||
|
||
%h1= t '.title' | ||
%p | ||
= link_to t('back'), <%= plural_name %>_path | ||
= link_to t('show'), @<%= singular_name %> | ||
= render 'form' | ||
|
||
== #{ link_to 'Show', @<%= singular_name %> } | #{ link_to 'Back', <%= plural_name %>_path } |
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
%h1 New <%= singular_name %> | ||
|
||
%h1= t '.title' | ||
%p= link_to t('back'), <%= plural_name %>_path | ||
= render 'form' | ||
|
||
= link_to 'Back', <%= plural_name %>_path |
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 | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
<% for attribute in attributes -%> | ||
%h1= t '.title' | ||
%p | ||
%strong <%= attribute.human_name %>: | ||
= @<%= singular_name %>.<%= attribute.name %> | ||
<% end -%> | ||
= link_to t('back'), <%= plural_name %>_path | ||
= link_to t('edit'), edit_<%= singular_name %>_path(@<%= singular_name %>) | ||
|
||
== #{ link_to 'Edit', edit_<%= singular_name %>_path(@<%= singular_name %>) } | #{ link_to 'Back', <%= plural_name %>_path } | ||
%dl | ||
<% for attribute in attributes -%> | ||
%dt= <%= class_name %>.human_attribute_name :<%= attribute %> | ||
%dd= @<%= singular_name %>.<%= attribute.name %> | ||
<% end -%> |