I have a HTML page, in that page, there some options for User to select, this will affect how content will display.
I save those options by using instance variable in controller. For example :
class ShopController < ApplicationController
def index
@option1 = option1 # instance variable option1, contains some information on the form
end
end
In this page, I have a form for user input information. When user presses submit button, ShopControler will process those information. But at that time, when I check @option1 variable --> NIL. It means : this is an another instance of ShopController.
Please give me a solution for the problem that I meet, that I can save information, and can reuse although user has summit form.
Thanks :)