diff options
Diffstat (limited to 'activerecord/test/models')
-rw-r--r-- | activerecord/test/models/bulb.rb | 5 | ||||
-rw-r--r-- | activerecord/test/models/wholesale_product.rb | 9 |
2 files changed, 5 insertions, 9 deletions
diff --git a/activerecord/test/models/bulb.rb b/activerecord/test/models/bulb.rb index efb98b66e7..888afc7604 100644 --- a/activerecord/test/models/bulb.rb +++ b/activerecord/test/models/bulb.rb @@ -33,4 +33,9 @@ class Bulb < ActiveRecord::Base end class CustomBulb < Bulb + after_initialize :set_awesomeness + + def set_awesomeness + self.frickinawesome = true if name == 'Dude' + end end diff --git a/activerecord/test/models/wholesale_product.rb b/activerecord/test/models/wholesale_product.rb deleted file mode 100644 index 5c6c15391c..0000000000 --- a/activerecord/test/models/wholesale_product.rb +++ /dev/null @@ -1,9 +0,0 @@ -class WholesaleProduct < ActiveRecord::Base - - after_initialize :set_prices - - def set_prices - self.msrp = 2 * wholesale if wholesale - end - -end |