user107680
user107680

Reputation: 81

Ruby get user input in Index view

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

Answers (1)

Beartech
Beartech

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

Related Questions