Check out the restful_authentication plugin. It explains all of this
for you through the use of the session resource.
Michael
On 4/27/07, joshuajnoble
<joshuajnoble-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> 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?
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---