Class variable

T

Travis D Warlick Jr

Mohamed said:
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 Warlick

"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."
 
H

hemant

I don't understand your question -- What do you mean by "Rails view"?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top