ActiveRecord after_initialize
August 14, 2009
If you’re using ActiveRececord’s after_initialize like this:
after_initialize :foo_bar
you might end up scratching your head. This “macro” style of using after_initialize does compile, however, it’s simply ignored. So to use after_initialize be sure to do this:
def after_initialize
foo
end
Advertisement