I'm trying to make a non-model form using form_for but getting the folliwing error, what is wrong?
ActionView::Template::Error (undefined method `param_key' for "Class":String):
My non active-record model
class Task < OpenStruct
extend ActiveModel::Naming
include ActiveModel::Conversion
// a bunch of code here
def persisted?
false
end
end
And my html.erb view
<%= form_for @task, url: form_url do |f| %>
Aucun commentaire:
Enregistrer un commentaire