Skip to content

Commit

Permalink
Added notice message for destroy method in scaffold
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul100885 committed Feb 9, 2013
1 parent da483d3 commit afdb84a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions railties/CHANGELOG.md
@@ -1,5 +1,9 @@
## Rails 4.0.0 (unreleased) ## ## Rails 4.0.0 (unreleased) ##


* Added notice message for destroy action in scaffold generator

*Rahul P. Chaudhari*

* Add --rc option to support the load of a custom rc file during the generation of a new app. * Add --rc option to support the load of a custom rc file during the generation of a new app.


*Amparo Luna* *Amparo Luna*
Expand Down
Expand Up @@ -47,7 +47,7 @@ def update
# DELETE <%= route_url %>/1 # DELETE <%= route_url %>/1
def destroy def destroy
@<%= orm_instance.destroy %> @<%= orm_instance.destroy %>
redirect_to <%= index_helper %>_url redirect_to <%= index_helper %>_url, notice: <%= "'#{human_name} was successfully destroyed.'" %>
end end
private private
Expand Down
Expand Up @@ -39,6 +39,7 @@ def test_controller_skeleton_is_created


assert_instance_method :destroy, content do |m| assert_instance_method :destroy, content do |m|
assert_match(/@user\.destroy/, m) assert_match(/@user\.destroy/, m)
assert_match(/User was successfully destroyed/, m)
end end


assert_instance_method :set_user, content do |m| assert_instance_method :set_user, content do |m|
Expand Down

0 comments on commit afdb84a

Please sign in to comment.