Created
December 6, 2014 10:40
-
-
Save pepetox/3fa6c8f37328f3abe798 to your computer and use it in GitHub Desktop.
Rails default value in a model
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
after_initialize :mimetodo | |
def mimeotdo | |
self.atributo ||= 0.0 #seting default | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment