I would recommend installing the restful_authentication plugin in a
new project and study how they do it. If you do this you will likely
drop your customized solution and simply use the plugin. It''s very
well done and would be a lot of work on your part to recreate. There
are some very easy instructions and it only takes a few minutes to
setup what you need for basic authentication. Then you can easily
extend your application to provided whatever authentication and
authorization you need. No need to reinvent the wheel here.
http://agilewebdevelopment.com/plugins/restful_authentication
On Oct 9, 5:20 pm, Bob
<bobclew...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I''ve got a variable called @current_user that I currently create
in
> each method of my controller. I''m thinking that I could reference
it
> at a higher level, and then only have it once in my code, but it''s
not
> clear to me where it should exist. I''ve got a bunch of objects
that I
> create in my models that are reused throughout my controllers, but
> since this variable references session info, I can''t put it there.
>
> Is there a simple solution to this (seems like there should be)?
> Perhaps it should live in the application controller?
>
> Thanks for your help.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---