Hi
Looking for some people to check/comment on a simple cleanup patch I
have for AR:
http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1728-accessor-methods-for-association-instances
Basically code like the following:
ivar = "@#{reflection.name}"
# for reading
association = instance_variable_get(ivar) if instance_variable_defined?
(ivar)
if association.respond_to?(:loaded?)
# ...
end
# and for writing
instance_variable_set(ivar, association)
Is replaced with code like:
# for reading
if association = association_instance_get(reflection.name)
# ...
end
# and for writing
association_instance_set(reflection.name, association)
- Eloy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---