How can I access these types in my controller. I'm trying the following
with my controller named Read:
a = Example.TYPE_A
That's not how class variables work. I haven't read it, but word on the street is `Ruby for Rails' by David A. Black is a good resource for learning Ruby with Rails. The Pickaxe is fantastic also (google: Ruby Pickaxe).
It won't allow me to declare the types and gives me a syntax error. Any
help would be appreciated. Aren't these just class variable
declarations and should be available through the class?
Yes. What you want is cattr_accessor. It works just like attr_accessor, but for class variables.
Class variables can be tricky. Check out this nutty blog post to understand their nuances: http://errtheblog.com/post/22