Shpigford
Shpigford

Reputation: 25368

skip_after_filter with if statement

How can I do skip_after_filter with an if statement?

skip_after_filter :intercom_rails_auto_include if current_account.expired?

I'm using Rails 4.0.1.

Upvotes: 0

Views: 209

Answers (1)

usha
usha

Reputation: 29369

skip_after_filter :intercom_rails_auto_include, if: :expired?

private 
def expired?
  current_account.expired?
end

Upvotes: 5

Related Questions