Class variable

Hai
I have one question
that Can i use class variable in Rails view?
Tell me
Bye

Visit My Website

Mohamed H. wrote:

Hai
I have one question
that Can i use class variable in Rails view?

I don’t understand your question – What do you mean by “Rails view”?


Travis W.

“Programming in Java is like dealing with your mom –
it’s kind, forgiving, and gently chastising.
Programming in C++ is like dealing with a disgruntled
girlfriend – it’s cold, unforgiving, and doesn’t tell
you what you’ve done wrong.”

On 7/13/07, Travis D Warlick Jr [email protected] wrote:

Mohamed H. wrote:

Hai
I have one question
that Can i use class variable in Rails view?

I don’t understand your question – What do you mean by “Rails view”?


Travis W.

Technically nothing prevents you from using a class variable in rails
view and i guess your class variable should be available in view as
well if you declare it with

class FoobarController < ApplicationController
cattr_accessor :bar_baz
end