11155
(-- --)
1
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:
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.
post your user_sessions_controller.rb
the problem is here:
/Users/abder/Desktop/inventroy_authentication/app/controllers/user_sessions_controller.rb:5:in `index’
11155
(-- --)
3
Thanks. Attached you can find the user_sessions_controller.rb file.
Attachments:
http://www.ruby-forum.com/attachment/4865/user_sessions_controller.rb
creat one method index with a list to all users and one index.html.erb in app/views/user with a list too.
11155
(-- --)
5
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.
Thanks Luciano.
Do you mean in the index method a list to all user sessions? Such as:
@user_session = UserSession.all
Thanks.
exactly
try it and say it did.
11155
(-- --)
7
Luciano Sousa wrote:
exactly
try it and say it did.
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