Login and RESTful problem

I’ve used this http://www.aidanf.net/rails_user_authentication_tutorial
for Authenticate before. Now I’m trying to learn RESTful. How do I make
it work? When trying to go to the login I get a server error, as it
tries to load the show action. How can I get past this when going to
/groups/login?

I partially solved it by map.resources :groups, :collection => {:login
=> :any}, but then post doesn’t work.

Did you add to routes.rb:

map.signup ‘/signup’, :controller => ‘users’, :action => ‘new’
map.login ‘/login’, :controller => ‘sessions’, :action => ‘new’
map.logout ‘/logout’, :controller => ‘sessions’, :action => ‘destroy’

Fernando P. wrote:

Did you add to routes.rb:

map.signup ‘/signup’, :controller => ‘users’, :action => ‘new’
map.login ‘/login’, :controller => ‘sessions’, :action => ‘new’
map.logout ‘/logout’, :controller => ‘sessions’, :action => ‘destroy’

Perfect. That solved it. :slight_smile:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs