Hi
In my routes.rb I have
map.login '/login',:controller => :user_sessions, :action => :new
Now I have controller action as
def create
@user_session = UserSession.new(params[:user_session])
if @user_session.save
redirect_to some_url
else
render :action => :new,:layout => 'my_layout'
end
end
The problem in the else case when render action new again what I
get in browser is
http://localhost:3000/user_session
But what I need is http://localhost:3000/login Or in the worst case
http://localhost:3000/user_sessions/new
How can I do this? Please help
Thanks
Tom
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.