由于验证已被弃用:
verify :method => :get, :only => [ :logout, :index ],
:redirect_to => { :action => :index }
verify :method => :post, :only => [ :login ],
:redirect_to => { :action => :index }
档案说,使用前置过滤器,如何将其翻译成前置过滤器?
其他档案说,如果您使用 REST 路由,则不需要验证或 before_filter。那时我的路线会是怎样的?目前是
Get ‘login’ => ‘login#login’