On 18 October 2011 16:25, Hesham <[email protected]> wrote:
> I have  a class variable (@neo) that that get initialized by using
> something:
>
> Graph.connect
>
> where the connect method will initialize the variable @neo
>
> Right now I call the Graph.connect method in any other class that
> needs to have the variable initialized.
>
> is there a way to have the variable initialized at the start of the
> execution of the app, regardless of point of entry?

You could specify it in a before_filter in application_controller.
Then it will get run for any action.

Colin

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to