Updated class_hash attribute so it works on Rails 3.2 (deprecated in 3.1)