1
我能夠成功覆蓋url_after_create
,但我的url_after_destroy
被忽略。Thoughtbot的清理寶石,覆蓋url_after_destroy
我在搞什麼?
路線:
map.resource :session,
:controller => 'sessions',
:only => [:new, :create, :destroy]
我的會話控制器:
class SessionsController < Clearance::SessionsController
private
def url_after_create
puts "************after create****************" #called on sign in
end
def url_after_destroy
puts "************after destroy****************" #never called
end
end
更新了文檔(這是一個wiki!):https://github.com/thoughtbot/clearance/wiki/Usage – 2011-01-23 02:17:20