Created
January 27, 2009 06:55
-
-
Save loe/53217 to your computer and use it in GitHub Desktop.
This file contains 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 characters
MyModel < AR::Base | |
before_validation :multiply_price_by_100 | |
protected | |
def multiply_price_by_100 | |
self.price = self.price * 100 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment