On Wed, Nov 29, 2006 at 10:00:52AM +0000, Adam Harper wrote:
> Paul van Tilburg wrote:
> > Here I use R(Foo, bar) in views to link to controller foo, this correctly
> > creates a /test/foo/bar link. However, when I use R() in some controller,
> > for example:
> > 
> >   headers['Refresh'] = "60; url=#{R(Foo, bar)}"
> > 
> > The generated link is /foo/bar, which obviously links to something
> > non-existant.  Can somebody affirm that R() in controllers do not
> > work correctly?
> 
> I don't think it's working incorrectly -- just a little unintuitively. 
> In short,  R() only prepends the app root (i.e. '/test') to the 
> generated URL when called from within a View -- not Controllers.

Yes, I see what you mean. Thanks for pointing that out. Indeed,
you assume it is going to behave the same.

Kind regards,
Paul

-- 
Student @ Eindhoven                         | email: [EMAIL PROTECTED]
University of Technology, The Netherlands   | JID: [EMAIL PROTECTED]
>>> Using the Power of Debian GNU/Linux <<< | GnuPG key ID: 0x50064181
_______________________________________________
Camping-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to