Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix inherited_resources error when redirecting to back

  • Loading branch information...
commit 6f2a1cf61f30469df01b97ac4a049bb061dc0a33 1 parent 65b081a
@johnmcaliley johnmcaliley authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 app/controllers/favorites_controller.rb
View
7 app/controllers/favorites_controller.rb
@@ -11,6 +11,11 @@ def create
end
def destroy
- destroy!{:back}
+ def destroy
+ destroy! do |success, failure|
+ success.html{redirect_to :back}
+ failure.html{redirect_to :back}
+ end
+ end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.