V
V
Vitaly Liber2015-05-28 07:57:57
Ruby on Rails
Vitaly Liber, 2015-05-28 07:57:57

How to pass variable in button from view to controller and refresh page?

There is a page with a table.
There are 20 results in the table.
Then comes pagination.
It is necessary to make two buttons:
- show 50 results
- show all
I found a variable in the controller, which is responsible for the number of displayed results. How can I pass a variable with the number of results to this variable using button and reload the page?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question