-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
bugSomething isn't workingSomething isn't working
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working