Re: [Rails] setting a variable only one time.
On 23 November 2011 14:42, Mauro <mrsanna1@gmail.com> wrote:
> On 23 November 2011 14:29, Colin Law <clanlaw@googlemail.com> 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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home