Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Cannot use :as with .new with child objects - ArgumentError: wrong number of arguments (2 for 0..1) #21

Closed
espen opened this Issue · 1 comment

1 participant

@espen

1) List has_many items.
2) Using list.items.create({}, :as => :admin) works.
2) Using list.items.new({}, :as => :admin) works in Rails3 gives error with this gem: 'ArgumentError: wrong number of arguments (2 for 0..1)'

See failing test at https://github.com/espen/protected_attributes_new_bug

@rafaelfranca rafaelfranca closed this issue from a commit
@rafaelfranca rafaelfranca Fix the CollectionProxy#new method
It was using the default Active Record implementation.

Fixes #21
8988900
@espen

Great! This makes me think that GitHub should have a "notify me when this commit is included in gem release" feature though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.