This may not be a bug that needs to be fixed, but it caused issues in production for us that were uncaught by our unit tests.
Bug report:
We have multiple form objects where we used something like this:
class RegistrationForm < YAAF::Form
attr_accessor :attributes
def initialize(attributes)
super(attributes)
@models = [user]
end
def user
@user ||= User.new(attributes)
end
end
Note that we use attributes as the name for the attr_accessor (in your docs example you use user_attributes.
This caused issues in production that raise errors like:
ActionView::Template::Error: undefined method 'fetch_value' for an instance of ActiveSupport::HashWithIndifferentAccess
I think we will proceed to rename all references to attributes for something like form_attributes and that should solve it. But opening a ticket to let you know about this issue.
I assume this was caused by this PR #93
- Version of the repo: v3.1.0
- Ruby and Rails Version: Ruby 3.4.8, Rails 8.1
This may not be a bug that needs to be fixed, but it caused issues in production for us that were uncaught by our unit tests.
Bug report:
We have multiple form objects where we used something like this:
Note that we use
attributesas the name for theattr_accessor(in your docs example you useuser_attributes.This caused issues in production that raise errors like:
I think we will proceed to rename all references to
attributesfor something likeform_attributesand that should solve it. But opening a ticket to let you know about this issue.I assume this was caused by this PR #93