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

fixing assignment of rdf_subjects in #attributes= #390

Merged
merged 1 commit into from
Apr 11, 2014

Conversation

no-reply
Copy link
Member

Subjects for Rdf::Resources created directly with #attributes= (i.e.
not build) were not getting set. This was causing some nodes with
assigned rdf_subjects to be treated as bnodes. Adds tests for assignment
of ids.

@@ -77,6 +77,7 @@ def final_parent

def attributes=(values)
raise ArgumentError, "values must be a Hash, you provided #{values.class}" unless values.kind_of? Hash
set_subject!(values.with_indifferent_access.delete(:id)) if values.with_indifferent_access.has_key?(:id) and node?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put the result of values.with_indifferent_access into a local variable and use it on this line and the next?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Subjects for Rdf::Resources created directly with #attributes= (i.e.
not build) were not getting set. This was causing some nodes with
assigned rdf_subjects to be treated as bnodes. Adds tests for assignment
of rdf_subjects.
jcoyne added a commit that referenced this pull request Apr 11, 2014
fixing assignment of rdf_subjects in #attributes=
@jcoyne jcoyne merged commit 86ba537 into samvera:master Apr 11, 2014
@no-reply no-reply deleted the feature/rdf-missing-params branch April 11, 2014 02:51
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 this pull request may close these issues.

None yet

2 participants