All the time, when you use POST you will be directed to create
action(if you use resources).
If you need to add some method to resource routing, use
resources :users do
get "some", :on => :member
end
But in your case it's better to use before_filter
before_filter :login
def login
...
end
On Mar 1, 12:45 pm, amvis <
vgrkrish...@gmail.com> wrote:
> i have one controller users. that have one method login and create method.
> i have to call that login method. but when i call using the firefox
> restclient that going to create method..?
> *
> *
> *class UsersController*
> *def create *
> *
> *
> *end*
> *def login*
> * *
> *
logger.info("method login ")*
> * end*
> *end*
> *
> *
> *routes.rb*
> *
> *
> * *match "/users/login", :controller => 'users', :action => 'login', :via
> => [:post]
> resources :users
> *
> *
> *
> *
> *In mozilla restclient plugin*
> *
> *
>
> *method*: post
> *Url*:
http://localhost:3000/users/login