Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting non-existent attributes with RDF nested attributes fails silently #393

Closed
no-reply opened this issue Apr 11, 2014 · 1 comment · Fixed by #395
Closed

Setting non-existent attributes with RDF nested attributes fails silently #393

no-reply opened this issue Apr 11, 2014 · 1 comment · Fixed by #395
Assignees

Comments

@no-reply
Copy link
Contributor

This problem was raised by issue (1) in this gist: https://gist.github.com/escowles/9975373.

Modeling errors like the one in the gist can be easily overlooked, and probably a better failure state is needed. Not being an expert on rails nested attributes, I'm not sure what the desired behavior is.

@jcoyne, @escowles: I'm hoping you can chime in.

@no-reply no-reply self-assigned this Apr 11, 2014
@escowles
Copy link
Contributor

I'm not sure what the Rails Way to handle this is. But it would certainly be helpful to get an error when trying to assign non-existent attributes in cases like this.

no-reply pushed a commit to no-reply/active_fedora that referenced this issue Apr 11, 2014
Sending a bad argument to Rdf::Resource#attributes= previously failed
silently. This is a problem, since it makes modeling errors invisible to
nested attributes setters, leading to missing data. Other Rails nested
attributes seem to throw an ArgumentError. This PR mimics that behavior
and message.

Closes samvera#393.
jeremyf pushed a commit to jeremyf/active_fedora that referenced this issue Apr 15, 2014
Created RdfList#to_ary and a mechanism for building list nodes.
Travis build samvera#393 failed, but samvera#392 passed and that references the same commit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants