我遇到需要使用alias_method_chain
alias_method_chain :allowed_to?, :update
def allowed_to_with_update?(action, context, options={}, &block)
if action.eql?(:update)
false
else
allowed_to_without_update?(action, context, options, &block)
end
end
显示错误,
stack level too deep
在这一行,
allowed_to_without_update?(action, context, options, &block)
知道如何转发阻止?