Skip to content

render field with a block leads to ArgumentError #39

@goldelehr

Description

@goldelehr

Hello,

when running the example code from the README's Form Field Guide i get an ArgumentError upon reaching this block:

render field(:reason) do |f|
  div do
    f.label { "Why should we care about you?" }
    f.textarea(row: 3, col: 80)
  end
end

i get this error:
ArgumentError #<Superform::Rails::Form::Field:0x00007f849562e168 @key=:reason, .... > (is not an ActiveModel-compatible object. It must implement :to_partial_path.)

I'm renderung the form with
render SignupForm.new @user

with @user being an ActiveRecord backed entity.

Is there something wrong with how i call the form?

Thanks for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions