I know that objects in Rails that extend ActiveRecord::Base can use a constructor that takes a hash of attributes names to values, but I can’t seem to find where that hash constructor is actually defined (doesn’t seem to be directly in ActiveRecord::Base). Can anyone point me to where that constructor exists?
I know that objects in Rails that extend ActiveRecord::Base can use a constructor that
Share
In rails 3.2.7 the
initializemethod appears to be inActiveRecord::Base.In the current master (commit
c10202208982bfa02ffd16d1614992228391d781at time of writing),BaseincludesActiveRecord::Model, which in turn includesActiveRecord::Core, whereinitializeis defined. It appears to be very similar to the method in 3.2.7.