Permalink
Browse files

Add notes for myself.

  • Loading branch information...
1 parent 1c77fa7 commit ec028327ea6467e3f859734d944e5465fc63d4be @MrJoy committed Mar 25, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/annotate/annotate_models.rb
@@ -299,6 +299,9 @@ def get_model_class(file)
# Retrieve loaded model class by path to the file where it's supposed to be defined.
def get_loaded_model(model_path)
+ # TODO: The following is spitting out bunches of deprecation warnings for
+ # TODO: ActionController::DoubleRenderError and
+ # TODO: ActionController::UnknownAction...
ObjectSpace.each_object.
select { |c| c.is_a?(Class) && c.ancestors.include?(ActiveRecord::Base) }.
detect { |c| ActiveSupport::Inflector.underscore(c) == model_path }

0 comments on commit ec02832

Please sign in to comment.