1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/models/bulb.rb

15 lines
339 B
Ruby
Raw Normal View History

class Bulb < ActiveRecord::Base
default_scope :conditions => {:name => 'defaulty' }
belongs_to :car
attr_reader :scoped_methods_after_initialize
after_initialize :record_scoped_methods_after_initialize
def record_scoped_methods_after_initialize
@scoped_methods_after_initialize = self.class.scoped_methods.dup
end
end