jrgoodner wrote:
> Hey there, I'd like to set up my application so that, upon
> successfully creating a new user (within the users controller), that
> user is automatically logged in.  So this is what I figured might
> work, but it doesn't:
> 
> <within users_controller.rb >
> ---------------------------
> def create
> @user = User.new(params[:user])
> ...
> if @user.save
>   ...
>   redirect_to(:controller => 'sessions', :action => 'create', :login
> => @user.login, :password => @user.password)
> else
>   ...
> end
> -----------------------------
> I get an error to the tone of "non-existent action."

That should work, I think.  Is create defined in SessionsController?

> 
> Any ideas?  Should I post my sessions_controller code?
> 
> Thanks in advance, I hope I've provided enough info.
> 
> Best,
> Jared

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
-- 
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to