-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Description
I'm following http://guides.rubyonrails.org/getting_started.html. This simple form doesn't work with trix_editor, though it does with text_area. Error: "undefined method `to_key' for nil:NilClass. Did you mean? to_query"
<%= form_with scope: :job, url: jobs_path, local: true do |form| %>
<p>
<%= form.label :description %><br>
<%= form.trix_editor :description %>
</p>
<% end %>
The stack trace points to https://github.com/rails/rails/blob/master/actionview/lib/action_view/record_identifier.rb#L108.
I think it's trying to generate an id and class from an ActiveRecord, but the record is nil. Maybe because form_with is new, and trix_editor doesn't work with it yet?
(I beg your forgiveness in advance if this is a stupid question. I'm only about a day into learning Ruby and Rails.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels