I've got the following simple_form:
= simple_form_for instance do |f|
= f.input :update_resolution, collection: 1..10
= f.button :submit
It throws the error:
undefined method `update_resolution' for #<Instance:0x007f0c07329640>
In instances_controller.rb
I have:
def update_resolution
render nothing: true, status: 200, content_type: 'text/html'
end
And I'm not 100% sure what's best to put in routes.rb
.
Goal: I'm trying make an auto-submitting dropdown to allow the user to run update_resolution with certain params.
Questions:
- Why does it throw this error & how can I fix it?
- What is the preferred
routes.rb
strategy?