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

Clarify and document support for nested fields in ChangeSet #827

Open
no-reply opened this issue May 13, 2020 · 0 comments
Open

Clarify and document support for nested fields in ChangeSet #827

no-reply opened this issue May 13, 2020 · 0 comments

Comments

@no-reply
Copy link
Contributor

I ran into the following issue creating nested fields:

class MyResource < Valkyrie::Resource
  attribute :my_set
end

class MyChangeSet < Valkyrie::ChangeSet 
  collection :my_set do
     property :something
  end
end

r = MyResource.new(my_set: Struct.new(:something).new('value'))
MyChangeSet.new(r)
# NameError: undefined local variable or method `build_errors' for #<#<Class:0x000055de3fee2960>:0x000055de403e2a00> 

this seems to have something to do with an error in the setup but the NameError isn't helpful to diagnose, and appears to be a Reform bug(???).

i was eventually able to get this working, but it took a lot of trial and error. documenting and testing support for nested ChangeSets would be a huge help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants