-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Thank you for the wonderful gem✨
When I tried to upgrade a Rails application that using this gem to Rails 8.0, the following error occurred.
ActionView::Template::Error (Passed nil to the :model argument, expect an object or false)
Caused by: ArgumentError (Passed nil to the :model argument, expect an object or false)
Information for: ActionView::Template::Error (Passed nil to the :model argument, expect an object or false):
1: <%= form_with url: '/search', id: 'form_with' do |f| %>
2: <%= f.search_field :query, id: 'query' %>
3: <% end %>
The cause is that the default value of the model:
argument of form_with
was changed from nil
to false
in Rails 7.2, and passing nil
to the model:
argument causes an error in Rails 8.0.
Metadata
Metadata
Assignees
Labels
No labels