I am using some constants that should be visible in the controller and
in a view.
Declaring the constant in the controller does not make the constant
visible in the view.
So my question:
Where can I declare the constant to be visible in all views and
controllers ?
Thanks a lot in advance
Christian
Hi,
I know its a simple question - but maybe someone can help
Thanks
Christian
Christian Neuhaus wrote:
I am using some constants that should be visible in the controller and
in a view.
Declaring the constant in the controller does not make the constant
visible in the view.
So my question:
Where can I declare the constant to be visible in all views and
controllers ?
Thanks a lot in advance
Christian
Set a instance attribute in the controller via before_filter.
–
– Tom M.
On Jan 27, 2006, at 12:15 AM, Christian Neuhaus wrote:
Declaring the constant in the controller does not make the constant
visible in the view.
So my question:
Where can I declare the constant to be visible in all views and
controllers ?
Thanks a lot in advance
Christian
Christain-
I usually put my constants in the environment.rb file. This way they
will be available everywhere in the whole app. just remember to
restart the webserver after makig changes to them.
Cheers-
-Ezra Z.
Yakima Herald-Republic
WebMaster
509-577-7732
[email protected]