Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename @loaded_associations to @association_cache ? #113

Open
rvalyi opened this issue Apr 25, 2014 · 1 comment
Open

rename @loaded_associations to @association_cache ? #113

rvalyi opened this issue Apr 25, 2014 · 1 comment

Comments

@rvalyi
Copy link
Member

rvalyi commented Apr 25, 2014

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

@rvalyi rvalyi changed the title rename @loaded_associations to @association_cache rename @loaded_associations to @association_cache ? Apr 25, 2014
@rvalyi
Copy link
Member Author

rvalyi commented Apr 28, 2014

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant