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

accept nested attributes for a property on an AF::Base object #682

Closed
jcoyne opened this issue Jan 13, 2015 · 0 comments
Closed

accept nested attributes for a property on an AF::Base object #682

jcoyne opened this issue Jan 13, 2015 · 0 comments
Assignees
Milestone

Comments

@jcoyne
Copy link
Member

jcoyne commented Jan 13, 2015

Currently if you have:

class Image < ActiveFedora::Base
  property :creator, predicate: ::RDF::DC.creator, class_name: Creator
  accepts_nested_attributes_for :creator
end

then when you instantiate the object you get:

ArgumentError: No association found for name `creator'. Has it been defined yet?
    from /Users/justin/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/active_fedora-bee58b88a84c/lib/active_fedora/nested_attributes.rb:87:in `block in accepts_nested_attributes_for'
    from /Users/justin/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/active_fedora-bee58b88a84c/lib/active_fedora/nested_attributes.rb:64:in `each'
    from /Users/justin/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/bundler/gems/active_fedora-bee58b88a84c/lib/active_fedora/nested_attributes.rb:64:in `accepts_nested_attributes_for'
@jcoyne jcoyne added this to the 9.0.0 milestone Jan 13, 2015
@jcoyne jcoyne self-assigned this Jan 13, 2015
@jcoyne jcoyne closed this as completed in 632aabf Jan 13, 2015
tpendragon pushed a commit that referenced this issue Jan 13, 2015
Support nested attributes for RDF properties. Fixes #682
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

No branches or pull requests

1 participant