working with classes inherited from ActiveRecord::Base