I have found that if I initialize a flag in my controller (under def
Initialize), it appears everytime I call a controller action, the flag
is set to the initialize value (even though I’m not calling the
initialized action). Am I observing this clearly?
I don’t think I should initialize a flag in the index file. So where?
Specifically, I want to know if this action is a new search (if so,
“reset” the $new_search flag). If not a new search, assign a value from
one of the action parameters.
I anticipate setting the $new_search flag to true in some other actions
(such as clicking a New Search button). But the very first time my page
displays, it is a “new search” and it appears the $new_search flag
begins life as “false”.
Perhaps I’ve made a bad assumption as I try to figure this out.
Can anyone straighten me out?