hobo_destroy dosn't pass options to destroy_response
Reported by Josh | August 15th, 2009 @ 12:17 AM
This is in hobo/hobo/lib/hobo/model_controller.rb line 607
destroy_response(&b)
Options should be passed to destroy_response. Because of this, :redirect doesn't work:
def destroy
hobo_destroy :redirect => '/'
end
The issue is I'm using auto_actions_for :user with contacts. If I try to delete one it sends me back to the user's page and I want to redirect to contacts_for_user_url(current_user)
Thanks,
.....Josh.....
Comments and changes to this ticket
-
Bryan Larsen August 17th, 2009 @ 07:17 PM
Is changing the line
destroy_response(&b)
todestroy_response(options, &b)
a sufficient fix? -
Bryan Larsen August 17th, 2009 @ 09:52 PM
Well, it doesn't break the tests that I have. Does it work in your app?
-
Josh August 19th, 2009 @ 09:46 PM
I'm not sure the best way to test it. Do I install Hobo as a plugin for the app?
Thanks.
-
Bryan Larsen August 19th, 2009 @ 10:10 PM
Yes, that's right. Instructions are here: http://cookbook.hobocentral.net/recipes/27-how-to-switch-from-the-gem
-
Bryan Larsen August 27th, 2009 @ 07:04 PM
- State changed from new to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป