Created
December 10, 2015 01:19
-
-
Save deep-spaced/0173715e079a2c7fbeff to your computer and use it in GitHub Desktop.
Rails: After Initialize example
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 characters
class Random < ActiveRecord::Base | |
after_initialize :check_data | |
after_initialize :save_data | |
before_save :check_data | |
before_save :save_data | |
private | |
def check_data | |
end | |
def save_data | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment