Class Variables in activerecord

If you are asking about actual class and class instance variables here's a brief explanation. If you're talking about variables that show up in view templates or somewhere else then please be more descriptive with your question.

Class variables in ruby persist throughout a whole class hierarchy.

   class A       @@a = 1

      def self.a ; @@a ; end    end

   A.a # => 1

   class B < A       @@a = 2    end

   A.a # => 2    B.a # => 2

Class instance variables on the other hand exist in the context of a single class definition.

   class C       @c = 1       def self.c ; @c ; end    end

  C.c # => 1

  class D < C        @c = 2   end

  C.c # => 1   D.c # => 2

Zach