Hi all,
I''m trying to come up with a simple way to handle the user hitting a
back button in a particular scenario, and I think flashing the params[]
array would be a simple solution. However, I have a piece of code that
is doing something very unexpected in the controller. The start of the
controller looks like this:
def index
logger.debug("VALUE OF PARAMS IS: #{params}")
#handle the case when the user hit the back button
if !flash[:params].nil?
logger.debug("OVERWRITING PARAMS")
params = flash[:params]
else
logger.debug("USING REGULAR PARAMS: #{params}")
end
...
And I get this in the logs:
VALUE OF PARAMS IS: isbnurihttp://www.amazon.co.u (... rest of params)
USING REGULAR PARAMS:
So, it''s as if the parameter array is being wiped clean, even though
the
"if" block of the code isn''t being exectued, only the else
block.
How is this possible?
Thanks!
Tom
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---