Skip to content

Instantly share code, notes, and snippets.

@lachie
Created October 12, 2009 03:57
Show Gist options
  • Save lachie/208111 to your computer and use it in GitHub Desktop.
Save lachie/208111 to your computer and use it in GitHub Desktop.
FirstPageStates = %w[new entering_details]
SecondPageStates = %w[entering_payment]
validate_presence_of :blah, :if => lambda {|order| FirstPageStates.include?(order.state) || SecondPageStates.include?(order.state) }
validate_presence_of :blim, :if => lambda {|order| FirstPageStates.include?(order.state) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment