Is there possibility to use js.erb views in Rails 6 application? I get
MyController#my_action is missing a template for this request format and variant.
request.formats: ["text/html"]
request.variant: []
error for actions using js.erb views after migration to rails 6.
In my action I just assign value to instance variable:
def next_question
@lesson = lesson
end
In routes I have
put ':package_id/lessons/next_question', to: 'lessons#next_question', as: 'next_question'
And there is form for submit this request
= form_tag next_question_path(@package), method: :put, remote: true
If I create (for test) html.slim file, everything works well.
If I add format.js to controller, I get ActionController::UnknownFormat