code: def infer_model_class(name)
        if defined? ActiveSupport
          name.to_s.classify.constantize
        else
          Object.const_get(name.to_s.split('_').collect!{ |w| w.capitalize }.join)
        end
      end
docs: Internal: Infers a model class.