Is there a way to access the session variable from the Model or Observer? Is there a better approach? I wanted to get the variable from the session to set the user who created a certain record. Thanks, Junrey -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Junrey, Consider looking at the UserStamp plugin. It does exactly what you are looking for. http://delynnberry.com/projects/userstamp/ V/r Anthony Eden On 1/3/07, Junrey Beduya <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Is there a way to access the session variable from the Model or > Observer? Is there a better approach? > > I wanted to get the variable from the session to set the user who > created a certain record. > > Thanks, > > Junrey > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Cell: 808 782-5046 Current Location: Melbourne, FL --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
hi, looks like a great plugin. pardon me for asking this question - i really am totally raw and new to RoR. my question is: How does this implementation work in a multi-threaded scenario (actually i don''t know much about how threads work in ror) - what i mean is that would it simulate a thread local behavior that java does and each thread would have its own current_user hope my question makes sense?! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Rails is single threaded, so it''s a non-issue. V/r Anthony On 1/5/07, karthik <karthik.nar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > hi, looks like a great plugin. pardon me for asking this question - i > really > am totally raw and new to RoR. my question is: > > How does this implementation work in a multi-threaded scenario > (actually i > don''t know much about how threads work in ror) - what i mean is that > would > it simulate a thread local behavior that java does and each thread > would > have its own current_user > > hope my question makes sense?! > > > > >-- Cell: 808 782-5046 Current Location: Melbourne, FL --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---