mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
14 lines
339 B
Ruby
14 lines
339 B
Ruby
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
|