Permalink
Browse files

- Active Resource associations, dont need send with eval

  • Loading branch information...
1 parent fc12bec commit 93cc66a1ab4033562895ecb91e292e42dcadd74d @gramos committed Oct 1, 2010
@@ -117,7 +117,7 @@ def has_many(resource, opts = {})
instance_eval "
def collection.<<(member)
- member.send(:#{o[:association_col]}=, #{id})
+ member.#{o[:association_col]} = #{id}
member.save
end"
@@ -114,5 +114,6 @@ def test_has_many_accessor_should_return_the_an_array_including_the_added_obj
@project.milestones << @other_milestone
assert_equal @other_milestone.project_id, @project.id
end
+
end

0 comments on commit 93cc66a

Please sign in to comment.