Skip to content

Instantly share code, notes, and snippets.

@coffeeaddict
Created December 17, 2010 11:21
Show Gist options
  • Save coffeeaddict/744801 to your computer and use it in GitHub Desktop.
Save coffeeaddict/744801 to your computer and use it in GitHub Desktop.
filters
class SomeController < ApplicationController
before_filter :check_from_invoice
before_filter :session_is_empty, :only => [:create]
def check_from_invoice
if some_condition
skip_before_filter :session_is_empty
end
end
def session_is_empty
# ... do stuff
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment