Tat*_*tat 4 ruby ruby-on-rails
例如:
class UsersController < ApplicationController
def doSomething
end
def doSomethingAgain
end
end
Run Code Online (Sandbox Code Playgroud)
我可以限制用户只将get方法传递给doSomething,但doSomethingAgain只接受post方法,我可以这样做吗?
class UsersController < ApplicationController
verify :method => :post, :only => :doSomethingAgain
def doSomething
end
def doSomethingAgain
end
end
Run Code Online (Sandbox Code Playgroud)