How to use 'after_initialize' in Rails 3?

前端 未结 1 396
无人共我
无人共我 2020-12-31 04:10

UPDATE

I wrongly checked the edgerails guide instead of the currently correct Rails 3 guide (which has no mention of after_initialize). Not sure why

相关标签:
1条回答
  • 2020-12-31 04:30

    The call backs should be used as macro style in your model: http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html

    0 讨论(0)
提交回复
热议问题