Patches: Browse | Submit New | Admin

[#19142] Override +current_page?+ Helper to work inside the Canvas

Date:
2008-03-27 21:18
Priority:
3
Submitted By:
John Weathers (jweathers777)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Override +current_page?+ Helper to work inside the Canvas

Detailed description
In my project, I wished to use the link_unless_current helper function for customizing the appearance of my menu item
tags when they are selected. As Facebooker now stands, this helper fails to work properly because inside the call to
the +current_page?+ helper, Rails compares the generated url_string which with Facebooker is rewritten to include the
canvas path on a canvas page. to the request string which of course doesn't include the canvas path

I patched +facebook_url_rewriting.rb+ to override +current_page?+ with a single-line change to the source as found in
the original +current_page?+ stripping the Facebook canvas from the url_string before doing the comparison work.

This patch works for me.

Add A Comment: Notepad

Please login


Followup

No Followups Have Been Posted

Attached Files:

Name Description Download
facebook_url_rewriting.rb.patch Patch that fixes current_page? for Facebook canvases Download

Changes:

Field Old Value Date By
File Added3538: facebook_url_rewriting.rb.patch2008-03-30 21:45jweathers777