Permalink
Browse files

Added notice message for destroy method in scaffold

  • Loading branch information...
1 parent da483d3 commit afdb84a1fe6694b667a06a8bfe77a5c5fbce837d @rahul100885 rahul100885 committed Feb 9, 2013
View
@@ -1,5 +1,9 @@
## 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.
*Amparo Luna*
@@ -47,7 +47,7 @@ def update
# DELETE <%= route_url %>/1
def destroy
@<%= orm_instance.destroy %>
- redirect_to <%= index_helper %>_url
+ redirect_to <%= index_helper %>_url, notice: <%= "'#{human_name} was successfully destroyed.'" %>
end
private
@@ -39,6 +39,7 @@ def test_controller_skeleton_is_created
assert_instance_method :destroy, content do |m|
assert_match(/@user\.destroy/, m)
+ assert_match(/User was successfully destroyed/, m)
end
assert_instance_method :set_user, content do |m|

0 comments on commit afdb84a

Please sign in to comment.