Permalink
Browse files

- ActiveResource association has_many fix resource=

  should set an array with the added methods
  • Loading branch information...
1 parent 7223ca7 commit ccd217e4057d1b1ca0069cc7d1913ea77625de6c @gramos committed Oct 2, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 activeresource/lib/active_resource/associations.rb
@@ -144,7 +144,11 @@ def collection.clear
collection = send(resource)
to_remove = collection - new_collection
to_remove.each{|m| collection.delete(m)}
- instance_variable_set("@#{resource}", new_collection)
+
+ # FIXME should call the old clear
+ collection.clear
+ # FIXME Is this needed?
+ collection.concat new_collection
end
end

0 comments on commit ccd217e

Please sign in to comment.