镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Clarify and document support for nested fields in ChangeSet #827

Open

Description

@no-reply

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions