Bugs: Browse | Submit New | Admin

[#21904] redirect_to_with_rfacebook breaks with redirect_to :back

Date:
2008-09-10 19:46
Priority:
3
Submitted By:
Jesse Clark (jesseclark)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
redirect_to_with_rfacebook breaks with redirect_to :back

Detailed description
Since Rails handles the :back parameter in redirect_to without ever calling url_for and redirect_to_with_rfacebook calls
url_for(options) on line 503 without checking for the :back condition, eventually Rails throws this exception:

undefined method `symbol_url' for #<ActivityStreamsController:0x3b30a08>

vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:27:in `send!'
vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:27:in `polymorphic_url'
vendor/rails/actionpack/lib/action_controller/base.rb:618:in `url_for_without_rfacebook'
vendor/plugins/rfacebook/lib/controller_extensions.rb:494:in `url_for'
vendor/plugins/rfacebook/lib/controller_extensions.rb:503:in `redirect_to'

I added this line before 'redirectUrl = url_for(options)':

return redirect_to_without_rfacebook(options) if options == :back

and it resolved the issue.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2009-01-05 19:08
Sender: Lee Farrell

hey dude thanks for that quick fix.

Has the underlying issue been resolved yet?

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item