I\'m new to rails, so I\'ll just explain my situation to you:
I\'ve got a User Model and a UsersController. Users log in with their email address and a password. Special
You probably have something like this in your routes file. (If not, please post that.)
resources :users
If you want to add a custom action that acts on a single User
, you can add that as a :member
like this.
resources :users do
member do
get :activate
end
end
Note that using a get
for something that modifies data is a bit wrong, but you're talking about hitting this from a link in an email.
As you play with routes don't forget that rake routes
will show you all of the routes that you currently have available to you.