diff options
Diffstat (limited to 'railties/lib/generators')
-rw-r--r-- | railties/lib/generators/erb/scaffold/templates/index.html.erb | 2 | ||||
-rw-r--r-- | railties/lib/generators/rails/scaffold_controller/templates/controller.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/generators/erb/scaffold/templates/index.html.erb b/railties/lib/generators/erb/scaffold/templates/index.html.erb index b5c7fd1e58..d30d306d42 100644 --- a/railties/lib/generators/erb/scaffold/templates/index.html.erb +++ b/railties/lib/generators/erb/scaffold/templates/index.html.erb @@ -24,4 +24,4 @@ <br /> -<%%= link_to 'New <%= singular_name %>', new_<%= singular_name %>_path %> +<%%= link_to 'New <%= human_name %>', new_<%= singular_name %>_path %> diff --git a/railties/lib/generators/rails/scaffold_controller/templates/controller.rb b/railties/lib/generators/rails/scaffold_controller/templates/controller.rb index 874e96a2b4..bbdce669dc 100644 --- a/railties/lib/generators/rails/scaffold_controller/templates/controller.rb +++ b/railties/lib/generators/rails/scaffold_controller/templates/controller.rb @@ -46,7 +46,7 @@ class <%= controller_class_name %>Controller < ApplicationController respond_to do |format| if @<%= orm_instance.save %> - format.html { redirect_to(@<%= file_name %>, :notice => '<%= class_name %> was successfully created.') } + format.html { redirect_to(@<%= file_name %>, :notice => '<%= human_name %> was successfully created.') } format.xml { render :xml => @<%= file_name %>, :status => :created, :location => @<%= file_name %> } else format.html { render :action => "new" } @@ -62,7 +62,7 @@ class <%= controller_class_name %>Controller < ApplicationController respond_to do |format| if @<%= orm_instance.update_attributes("params[:#{file_name}]") %> - format.html { redirect_to(@<%= file_name %>, :notice => '<%= class_name %> was successfully updated.') } + format.html { redirect_to(@<%= file_name %>, :notice => '<%= human_name %> was successfully updated.') } format.xml { head :ok } else format.html { render :action => "edit" } |