Created
December 1, 2010 01:04
-
-
Save matthodan/722751 to your computer and use it in GitHub Desktop.
Revisions
-
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ class User < ActiveRecord:Base private def user_is_happy_and_broke if self.state_of_mind != 'happy' || self.fiscal_status != 'broke' errors.add :user_not_happy_and_broke, 'User must be happy and broke to continue' end end -
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ class User < ActiveRecord:Base validate :user_is_happy_and_broke private def user_is_happy_and_broke if self.state_of_mind == 'happy' && self.fiscal_status == 'broke' errors.add :user_not_happy_and_broke, 'User must be happy and broke to continue' end end end