Referring it outside the context makes sense to add [:admin, @user] which is intuitive. While coding that we realise we are outside the context. Also guessing instead of fixing it in the code, helps in moving the controller to a different name space easier.
On Oct 12, 1:55 pm, "Mislav Marohnić" <[EMAIL PROTECTED]> wrote: > On 10/12/07, blj <[EMAIL PROTECTED]> wrote: > > > > > Excuse me, if I come across as a complete idiot, this is the first > > time am looking at the edge, resources and url helpers. Certainly, I > > felt the pain while trying to pass [:admin, @user] for so many url > > helpers. > > So, you want to be able to call url_for(@user) and that Rails guesses that > it is in the :admin namespace because the current controller is > "admin/users". I felt this pain of context insensitivity too, but if you > have User resource outside of admin namespace, how would you refer to it > then? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---