Reputation: 81
I want to create a number_field
on my index
view so that way an admin can submit an id
to a method. How can I do this?
Can I simply use a form_for
on the index
view?
Upvotes: 0
Views: 137
Reputation: 6411
Yes. You can use a form partial in your index view. You can then use a submit button or an AJAX action to submit it.
This has some good pointers: https://richonrails.com/articles/partials-in-ruby-on-rails
Upvotes: 1