trying out Authlogic for the first time (joined the mail list but apparently the first message is moderated and it''s been hours)... created db sessions but when I log in, no entry is added to sessions db Maybe it''s because my ''user'' model is named ''member'' and thus I substituted /user/member/ and /User/Member/ but I wouldn''t think so. I can login and save passwords but cannot get value from ''current_member'' or any session variables either. Should I be creating a member_sessions table in the db or does the standard Rails sessions table handle this function? I ask because it is empty. Craig -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- 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.
No, you do not need to create a model named member. User is sufficient. But you have create user_session model a user_sessions controller. Try doing exactly as said in this- http://github.com/binarylogic/authlogic_example/ Let us know if you are facing problems still. On Thu, Jan 21, 2010 at 8:00 PM, Craig White <craigwhite-BQ75lA0ptkhBDgjK7y7TUQ@public.gmane.org> wrote:> trying out Authlogic for the first time (joined the mail list but > apparently the first message is moderated and it''s been hours)... > > created db sessions but when I log in, no entry is added to sessions db > > Maybe it''s because my ''user'' model is named ''member'' and thus I > substituted /user/member/ and /User/Member/ but I wouldn''t think so. > > I can login and save passwords but cannot get value from > ''current_member'' or any session variables either. > > Should I be creating a member_sessions table in the db or does the > standard Rails sessions table handle this function? I ask because it is > empty. > > Craig > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Satyajit -- 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.
I found ryanb''s railscast video helpful too: http://railscasts.com/episodes/160-authlogic On Jan 21, 8:59 pm, Satyajit Malugu <malugu.satya...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> No, you do not need to create a model named member. User is sufficient. > But you have create user_session model a user_sessions controller. > > Try doing exactly as said in this-http://github.com/binarylogic/authlogic_example/ > > Let us know if you are facing problems still. > > > > On Thu, Jan 21, 2010 at 8:00 PM, Craig White <craigwh...-BQ75lA0ptkhBDgjK7y7TUQ@public.gmane.org> wrote: > > trying out Authlogic for the first time (joined the mail list but > > apparently the first message is moderated and it''s been hours)... > > > created db sessions but when I log in, no entry is added to sessions db > > > Maybe it''s because my ''user'' model is named ''member'' and thus I > > substituted /user/member/ and /User/Member/ but I wouldn''t think so. > > > I can login and save passwords but cannot get value from > > ''current_member'' or any session variables either. > > > Should I be creating a member_sessions table in the db or does the > > standard Rails sessions table handle this function? I ask because it is > > empty. > > > Craig > > > -- > > This message has been scanned for viruses and > > dangerous content by MailScanner, and is > > believed to be clean. > > > -- > > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- > Satyajit-- 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.
Hello. Try adding this line to config/environment.rb in config block: config.action_controller.session_store = :active_record_store -- 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 Thu, 2010-01-21 at 23:51 -0800, Ugis Ozols wrote:> Hello. > > Try adding this line to config/environment.rb in config block: > > config.action_controller.session_store = :active_record_store---- yes, this was needed. I think I expected that this was going to be added automatically when I ran ''rake db:sessions:create'' command but now at least it is adding sessions to the sessions table. Craig -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- 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 Fri, 2010-01-22 at 05:44 -0700, Craig White wrote:> On Thu, 2010-01-21 at 23:51 -0800, Ugis Ozols wrote: > > Hello. > > > > Try adding this line to config/environment.rb in config block: > > > > config.action_controller.session_store = :active_record_store > ---- > yes, this was needed. I think I expected that this was going to be added > automatically when I ran ''rake db:sessions:create'' command but now at > least it is adding sessions to the sessions table.---- my questions are still not coming out on the authlogic list... Each link I touch on my web site creates an identical session record in sessions table... (identical session_id and data columns) and if I don''t disable ''protect_from_forgery'', I get InvalidAuthenticityToken error upon login. Perhaps this is caused by my using ''Member'' instead of ''User'' and ''MemberSessions'' instead of ''UserSessions'' throughout but I wouldn''t think so. Something in my sessions is not working correctly also, FTR... I found ''config.action_controller.session_store = :active_record_store'' commented out in config/initializers/session_store.rb and uncommented that one and commented out the added entry in config/environment.rb. Craig -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- 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 Fri, 2010-01-22 at 09:36 -0700, Craig White wrote:> On Fri, 2010-01-22 at 05:44 -0700, Craig White wrote: > > On Thu, 2010-01-21 at 23:51 -0800, Ugis Ozols wrote: > > > Hello. > > > > > > Try adding this line to config/environment.rb in config block: > > > > > > config.action_controller.session_store = :active_record_store > > ---- > > yes, this was needed. I think I expected that this was going to be added > > automatically when I ran ''rake db:sessions:create'' command but now at > > least it is adding sessions to the sessions table. > ---- > my questions are still not coming out on the authlogic list... > > Each link I touch on my web site creates an identical session record in > sessions table... (identical session_id and data columns) > > and if I don''t disable ''protect_from_forgery'', I get > InvalidAuthenticityToken error upon login. > > Perhaps this is caused by my using ''Member'' instead of ''User'' and > ''MemberSessions'' instead of ''UserSessions'' throughout but I wouldn''t > think so. > > Something in my sessions is not working correctly > > also, FTR... I found ''config.action_controller.session_store > = :active_record_store'' commented out in > config/initializers/session_store.rb and uncommented that one and > commented out the added entry in config/environment.rb.---- FTR Had to close all instances of the browser and reload... that was simple enough but a lot of time wasted figuring it out. Leaving the footsteps in case anyone else has this issue. Craig -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- 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.