Matthew Beale
2008-Nov-11 21:27 UTC
[Facebooker-talk] facebook_url_helper breaking link_to in actionmailer
Hey all, The new facebook_url_helper code relies on request_comes_from_facebook? for link_to and other common helpers. request_comes_from_facebook? is only defined when in a normal view. I needed the attached patch to fix my emails. It''s not really a pretty solution, I just change all: !request_comes_from_facebook? to !(request_comes_from_facebook? rescue false) this is on [7d46417a7dabb0772c0757b63fe5374ae96f34f1]. -- Matthew Beale :: 607 227 0871 Resume & Portfolio @ http://madhatted.com -------------- next part -------------- A non-text attachment was scrubbed... Name: dont_fail_in_non_controllers.patch Type: text/x-patch Size: 2436 bytes Desc: not available URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20081111/2eb10d88/attachment.bin>
Mike Mangino
2008-Nov-11 21:56 UTC
[Facebooker-talk] facebook_url_helper breaking link_to in actionmailer
Even better, if you can create a failing test for it, I''ll work on a fix. Mike On Nov 11, 2008, at 4:27 PM, Matthew Beale wrote:> Hey all, > > The new facebook_url_helper code relies on > request_comes_from_facebook? > for link_to and other common helpers. request_comes_from_facebook? is > only defined when in a normal view. > > I needed the attached patch to fix my emails. It''s not really a > pretty > solution, I just change all: > > !request_comes_from_facebook? > > to > > !(request_comes_from_facebook? rescue false) > > this is on [7d46417a7dabb0772c0757b63fe5374ae96f34f1]. > > -- > Matthew Beale :: 607 227 0871 > Resume & Portfolio @ http://madhatted.com > < > dont_fail_in_non_controllers > .patch>_______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk-- Mike Mangino http://www.elevatedrails.com