ooor icon indicating copy to clipboard operation
ooor copied to clipboard

rename @loaded_associations to @association_cache ?

Open rvalyi opened this issue 11 years ago • 1 comments

see lib/active_record/associations.rb it seems they use @association_cache the same way we use @loaded_associations in Ooor

rvalyi avatar Apr 25 '14 22:04 rvalyi

may be more complex than what I said, for instance with p project having o2m tasks, with ActiveRecord we have:

p.association_cache[:tasks].reflection => #<ActiveRecord::Reflection::AssociationReflection:0x00000005dec6a0 @macro=:has_many, @name=:tasks, @options={:extend=>[], :autosave=>true}, @active_record=Project(id: integer, name: string, created_at: datetime, updated_at: datetime, description: string, owner_id: integer), @plural_name="tasks", @collection=true, @class_name="Task", @klass=Task(id: integer, name: string, description: string, project_id: integer, created_at: datetime, updated_at: datetime, done: boolean), @foreign_key="project_id", @active_record_primary_key="id", @type=nil>

rvalyi avatar Apr 28 '14 05:04 rvalyi