For example:
class UsersController < ApplicationController
def doSomething
end
def doSomethingAgain
end
end
Can I restrict the user pass a get method only to doSomething, but doSomethingAgain is only accept post method, can I do so?
For example:
class UsersController < ApplicationController
def doSomething
end
def doSomethingAgain
end
end
Can I restrict the user pass a get method only to doSomething, but doSomethingAgain is only accept post method, can I do so?
class UsersController < ApplicationController
verify :method => :post, :only => :doSomethingAgain
def doSomething
end
def doSomethingAgain
end
end
You may specify in routes.rb
map.resources :users, :collection=>{
:doSomething= > :get,
:doSomethingAgain => :post }
You may specify more then one method
map.resources :users, :collection=>{
:doSomething= > [:get, :post],
:doSomethingAgain => [:post, :put] }