lib/arrest/helper/has_many.rb in arrest-0.0.61 vs lib/arrest/helper/has_many.rb in arrest-0.0.62
- old
+ new
@@ -33,12 +33,10 @@
foreign_key,
read_only)
add_attribute(hm_attr)
send :define_method, method_name do # e.g. define 'teams' method for notation 'has_many :teams'
- @has_many_collections ||= {}
- @has_many_collections[method_name] ||= HasManyCollection.new(self, hm_attr)
- @has_many_collections[method_name]
+ HasManyCollection.new(self, hm_attr)
end
end
def create_has_many_attribute(sub_resource, ids_field_name, method_name,
clazz_name, url_part, foreign_key, read_only)
\ No newline at end of file