On 23 November 2011 14:42, Mauro <[email protected]> wrote: > On 23 November 2011 14:29, Colin Law <[email protected]> wrote: > >> >> If you always want it :intra_guest then why have you got the logic in >> set_default_role why not just set it to that? > > The user may or not login to the application, if the user wants to > manage the application then it must be logged in and a role is > assigned, say admin, if it wants only see a list of products, for > example, then it must not to be logged in and I assign a default role, > say guest.
So how could you set it once at application start when you need different values for different users? Application Start is when the server is started. It may not be restarted for months. There is not one instance of the application for each user. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

