Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Modified flash notices for create, update & destroy to properly infle…
…ct multi-word class names
  • Loading branch information
wheels authored and ryanb committed Aug 14, 2009
1 parent 8aed0bc commit 95c59fd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
@@ -1,7 +1,7 @@
def create
@<%= singular_name %> = <%= class_name %>.new(params[:<%= singular_name %>])
if @<%= singular_name %>.save
flash[:notice] = "Successfully created <%= name.humanize.downcase %>."
flash[:notice] = "Successfully created <%= name.underscore.humanize.downcase %>."
redirect_to <%= item_path('url') %>
else
render :action => 'new'
Expand Down
@@ -1,6 +1,6 @@
def destroy
@<%= singular_name %> = <%= class_name %>.find(params[:id])
@<%= singular_name %>.destroy
flash[:notice] = "Successfully destroyed <%= name.humanize.downcase %>."
flash[:notice] = "Successfully destroyed <%= name.underscore.humanize.downcase %>."
redirect_to <%= items_path('url') %>
end
@@ -1,7 +1,7 @@
def update
@<%= singular_name %> = <%= class_name %>.find(params[:id])
if @<%= singular_name %>.update_attributes(params[:<%= singular_name %>])
flash[:notice] = "Successfully updated <%= name.humanize.downcase %>."
flash[:notice] = "Successfully updated <%= name.underscore.humanize.downcase %>."
redirect_to <%= item_path('url') %>
else
render :action => 'edit'
Expand Down

0 comments on commit 95c59fd

Please sign in to comment.