Hi, I am using Authlogic & Weborb to remote from as3. Is it possible to access current_user, which is defined in a helper method in the application controller, in a Service class. Thank you in advance, John. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
jeremysavoy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2010-Apr-03 15:49 UTC
Re: current_user Authlogic & Service.rb
I have the same question, did you ever find a solution? -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Unfortunately not. There are many posts regarding the wrongness of passing a variable to a model for example (which makes sense) and I just assume the same wrongness in our case - however no suggested solution. Just for fun I stuffed some of the user info into a global in the user sessions controller and it failed (as expected) in production. I tried also to stick it into the session. There must be something that can be done in the weborb config. The weborb forums are no help. In the mean time I temporarily solved my problem by identifying the user via ip address (which I can do in my situation). If you find anything that works, please let me know. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 4 April 2010 07:03, Liquid Fury <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Unfortunately not. There are many posts regarding the wrongness of > passing a variable to a model for example (which makes sense)Why do you need the current user in the model? Colin> and I just > assume the same wrongness in our case - however no suggested solution. > Just for fun I stuffed some of the user info into a global in the user > sessions controller and it failed (as expected) in production. I tried > also to stick it into the session. There must be something that can be > done in the weborb config. The weborb forums are no help. In the mean > time I temporarily solved my problem by identifying the user via ip > address (which I can do in my situation). > > If you find anything that works, please let me know. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
> > Why do you need the current user in the model? > > ColinI don''t need it in the model. I need it in a service class. When remoting from as3, I can only call functions defined in such a class. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.