Skip to content

Instantly share code, notes, and snippets.

@amiel
Created March 7, 2013 19:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save amiel/5110836 to your computer and use it in GitHub Desktop.
Save amiel/5110836 to your computer and use it in GitHub Desktop.
class Task < ActiveRecord::Base
belongs_to :project
validate do
if project.status != 'funded'
errors.add(:base, 'Project must be funded')
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment