Reputation: 3200
I my project I am having varible
id=params[:id]
status=params[:status]
.....
if(!status.nil?)
if(status='off')
flag[id]=1
else
flag[id]=2
end
else
if(flag==1)
puts off
else
puts on
end
request come with status depending on status I am creating flag
i want to use that flag in next call to the function when the status is nil
My problem is that I am not getting the flag values in next call
How to temporary store that values for later use
Upvotes: 0
Views: 92
Reputation: 12235
If you want to keep a value between requests, using sessions is probably the right way to do it. See this guide for more on the topic.
Upvotes: 3