Forum: Ruby on Rails Declare global variable in views

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
453493fcee22adbf3c46ac793a346ef5?d=identicon&s=25 Nike Mike (nike)
on 2009-05-05 15:50
how to declare a variable globally in views without writing in
controller,model or in config
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-05-05 18:20
(Received via mailing list)
On May 5, 2:50 pm, Nike Mike <rails-mailing-l...@andreas-s.net> wrote:
> how to declare a variable globally in views without writing in
> controller,model or in config
> --
that doesn't sound like a good idea. If you can elaborate on what
you're trying to do someone might be able to chip in with a neater way
of doing things.

Fred
Ced56202e9039027cfc2da2f70457977?d=identicon&s=25 E. Litwin (Guest)
on 2009-05-05 18:24
(Received via mailing list)
I agree with Frederick.

Depending on what you need, using a session key/value or cookie may be
the appropriate way to maintain the data.

On May 5, 9:19 am, Frederick Cheung <frederick.che...@gmail.com>
This topic is locked and can not be replied to.