def method help

As Raffael suggested, you would need to use an instance variable
(@temp) rather than a local variable. The local variable would only be
available from the context within which it is called, while the
instance variable would be available instance-wide. This sort of
situation is where a basic understanding of Ruby comes in handy.

A question that I won't go into, but one that you might want to ask
yourself, is whether or not these methods actually belong in your
controller. Typically controller methods are either actions or private
methods used in filters. Your methods might be better put in either
the helper (if they relate to presentation) or the model (if they
relate to business or database logic).