Community Page
- www.rickylui.com/blog Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- Agree and perception is a major topic in management. I sometimes compare low perception value but with real quality and great perception value but low real quality, which one is the less of the two...
Jump to original thread »
A few things I learned about ActiveRecord after_create (and other callbacks)
Started by rickylui · 1 year ago
1. after_create does not get inherited
class Animal < ActiveRecord::Base
after_create :feed_on_milk
def feed_on_milk
self.immunity_level = 1
end
end
class Cat < Animal
end%3 ... Continue reading »
class Animal < ActiveRecord::Base
after_create :feed_on_milk
def feed_on_milk
self.immunity_level = 1
end
end
class Cat < Animal
end%3 ... Continue reading »
0 comments
This thread has no comments yet.