Merge pull request #9233 from rahul100885/master

Added notice message for destroy method in scaffold
This commit is contained in:
Carlos Antonio da Silva 2013-02-09 13:24:17 -08:00
commit 34238422b9
3 changed files with 6 additions and 1 deletions

@ -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|