Permalink
Browse files

Using the model_* variants of the singular_name/plural_name helpers i…

…n the HAML views so the generated titles will use the real model name and not the generic "Resource"/"Resources" labels we get when configured to use Inherited Resources.
  • Loading branch information...
Frederic BLANC
Frederic BLANC committed Feb 9, 2010
1 parent 6481054 commit e74f043241ad5c99e23c06b68fb2ed83461648ba
@@ -1,5 +1,5 @@
%h1.heading
- = "Editing <%= singular_name %> %s" % <%= resource_instance %>.id
+ = "Editing <%= model_singular_name %> %s" % <%= resource_instance %>.id
<% if options[:formtastic] -%>
- semantic_form_for(<%= resource_instance %>) do |form|
@@ -15,4 +15,4 @@
<% end -%>
%p.actions
- = link_to 'Cancel', <%= index_path %>
+ = link_to 'Cancel', <%= index_path %>
@@ -1,8 +1,8 @@
%h1.heading
- = "<%= plural_name.humanize %>"
+ = "<%= model_plural_name.humanize %>"
%p.actions
- = link_to 'New <%= singular_name.humanize %>', <%= new_path %>
+ = link_to 'New <%= model_singular_name.humanize %>', <%= new_path %>
%table
%thead.header
@@ -17,4 +17,4 @@
<% if options[:pagination] -%>
= will_paginate(<%= collection_instance %>)
-<% end -%>
+<% end -%>
@@ -1,5 +1,5 @@
%h1.heading
- = 'New <%= singular_name.humanize %>'
+ = 'New <%= model_singular_name.humanize %>'
<% if options[:formtastic] -%>
- semantic_form_for(<%= resource_instance %>) do |form|
@@ -15,4 +15,4 @@
<% end -%>
%p.actions
- = link_to 'Cancel', <%= index_path %>
+ = link_to 'Cancel', <%= index_path %>
@@ -1,5 +1,5 @@
%h1.heading
- = "<%= singular_name.humanize %> %s" % <%= resource_instance %>.id
+ = "<%= model_singular_name.humanize %> %s" % <%= resource_instance %>.id
- content_tag_for(:dl, <%= resource_instance %>) do
<% attributes.each do |attribute| -%>
@@ -10,4 +10,4 @@
%p.actions
= link_to 'Edit', <%= edit_path %>
|
- = link_to 'Index', <%= index_path %>
+ = link_to 'Index', <%= index_path %>

0 comments on commit e74f043

Please sign in to comment.