[Facebooker-talk] url_for + :canvas => false weirdness for non resource controllers

Heavy Sixer heavysixer at gmail.com
Fri Apr 4 22:45:07 EDT 2008


I noticed something strange in my app today. It appears that the  
extra canvas path appended in url_for is back but only for  
controllers that are not resources. Here is an example I have in my  
site:

campaigns is a resource
checkout is not

# With the canvas false flag

(rdb:1) @controller.url_for(:controller => 'campaigns', :action =>  
'show', :id => 1,:canvas => false,:only_path => true)
"/campaigns/1"

(rdb:1) @controller.url_for(:controller => 'checkout', :action =>  
'ipn',:canvas => false,:only_path => true)
"/pledgie/checkout/ipn"


# With the canvas true flag
(rdb:1) @controller.url_for(:controller => 'campaigns', :action =>  
'ipn',:canvas => true,:only_path => true)
"/pledgie/campaign/1"

(rdb:1) @controller.url_for(:controller => 'checkout', :action =>  
'ipn',:canvas => true,:only_path => true)
"/pledgie/pledgie/checkout/ipn"

Notice that the non resource controller "checkout" has an extra  
canvas path applied to it.

Anyone know a way around this?

Mark



More information about the Facebooker-talk mailing list