I know how to setup a roo_url using map.root in "routes.rb". The issue I''m currently having is as follows: I walking through this Rails cast regarding Authlogic: http://railscasts.com/episodes/160-authlogic I decided that I make my map.root the "login" page, that is, the index.html.erb of the user_sessions_controller. So, what I did is typed the following in the "routes.rb": map.root :controller => "user_sessions" But, get the following: http://pastie.org/1050272 When I changed: @user_sessions = UserSession.all To: @user_sessions = UserSession.find[:all], I got the following: http://pastie.org/1050274 Provided that, for example I have a users_controller, and when in "routes.rb" I do: map.root :controller => "users", I get the expected output and it works fine. Isn''t that weird? Appreciate your support on this. -- 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.
post your user_sessions_controller.rb the problem is here: /Users/abder/Desktop/inventroy_authentication/app/controllers/user_sessions_controller.rb:5:in `index'' 2010/7/19 Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>> > I know how to setup a roo_url using map.root in "routes.rb". > > The issue I''m currently having is as follows: > > I walking through this Rails cast regarding Authlogic: > http://railscasts.com/episodes/160-authlogic > > I decided that I make my map.root the "login" page, that is, the > index.html.erb of the user_sessions_controller. > > So, what I did is typed the following in the "routes.rb": > > map.root :controller => "user_sessions" > > But, get the following: http://pastie.org/1050272 > > When I changed: > > @user_sessions = UserSession.all > > To: > > @user_sessions = UserSession.find[:all], I got the following: > http://pastie.org/1050274 > > Provided that, for example I have a users_controller, and when in > "routes.rb" I do: > > map.root :controller => "users", I get the expected output and it works > fine. > > Isn''t that weird? > > Appreciate your support on this. > -- > 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 torubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> .> For more options, visit this group athttp://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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks. Attached you can find the user_sessions_controller.rb file. Attachments: http://www.ruby-forum.com/attachment/4865/user_sessions_controller.rb -- 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.
creat one method index with a list to all users and one index.html.erb in app/views/user with a list too. 2010/7/19 Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>> Thanks. Attached you can find the user_sessions_controller.rb file. > > Attachments: > http://www.ruby-forum.com/attachment/4865/user_sessions_controller.rb > > -- > 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-/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. > >-- 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.
Luciano Sousa wrote:> creat one method index with a list to all users and one index.html.erb > in > app/views/user with a list too. > > 2010/7/19 Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>Thanks Luciano. Do you mean in the index method a list to all user sessions? Such as: @user_session = UserSession.all Thanks. -- 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.
exactly try it and say it did. 2010/7/19 Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>> Luciano Sousa wrote: > > creat one method index with a list to all users and one index.html.erb > > in > > app/views/user with a list too. > > > > 2010/7/19 Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> > > Thanks Luciano. > > Do you mean in the index method a list to all user sessions? Such as: > > @user_session = UserSession.all > > Thanks. > -- > 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-/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. > >-- 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.
Luciano Sousa wrote:> exactly > try it and say it did. > > 2010/7/19 Abder-Rahman Ali <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>Thanks Luciano. Sorry, it seems I sent the wrong user_sessions_controller.rb, but still getting the same issue I mentioned. This is the user_sessions_controller.rb I have. What do you think? Attachments: http://www.ruby-forum.com/attachment/4866/user_sessions_controller.rb -- 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.
Reasonably Related Threads
- Authlogic and rails 3 : NameError in User sessionsController#new
- RSpec with Rails 3.1rc4: spec test won't recognize <%= %> (should be simple)
- NoMethodError in User sessionsController#create - Authlogic
- NoMethodError in User sessionsController#new
- Fail to call