I would like to have ‘Next’ and ‘Previous’ buttons on my page but when clicked, I want to have the appropriate controller action called but without redirecting to the domain/controller/action.
The next and previous actions would pop from a session array that contains ids of what to display.
Is it possible to provide my link: reader_next_path (redirects to localhost/reader/next)
but then have the Reader next method render the index with my specified @instance_variables?
I really don’t want to have to create a new template for all of these actions.
render “index”
http://guides.rubyonrails.org/layouts_and_rendering.html#using-render