skip_after_filter with if语句

时间:2014-02-13 21:42:53

标签: ruby-on-rails

如何使用skip_after_filter声明进行if

skip_after_filter :intercom_rails_auto_include if current_account.expired?

我正在使用Rails 4.0.1。

1 个答案:

答案 0 :(得分:5)

skip_after_filter :intercom_rails_auto_include, if: :expired?

private 
def expired?
  current_account.expired?
end