Forum: Ruby on Rails RESTful question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
joshuajnoble (Guest)
on 2007-04-27 19:56
(Received via mailing list)
I have a question about a RESTful basic that I'm a little confused
about. I have a login method that I want to call for anyone trying to
use any admin methods.

So my admin_controller has a filter like so:

before_filter :admin_authenticate, :except => :login

before I went RESTful everything was fine just using "http://localhost:
3000/admins/login" but now I have to use "http://localhost:3000/admins/
login/1". I don't want to need the id in there since we're not going
to know the admins id before they log in, but I'm not sure what I need
to do to get the controller to respond simply to "http://localhost:
3000/admins/login"

I'm thinking this is something that I'm just not understanding about
routing. Can anyone elucidate me?
Michael T. (Guest)
on 2007-04-27 21:35
(Received via mailing list)
Check out the restful_authentication plugin.  It explains all of this
for you through the use of the session resource.

Michael
This topic is locked and can not be replied to.