- def get_all_subclasses_of(string)
- raise ArgumentError.new("#{string} is not an AR Class") if eval(string).class.ancestors
- .collect {|e| e.to_s.downcase}.include? ("ActiveRecord::Base")
-
- return ObjectSpace.subclasses_of(eval(string))
- end
No comments:
Post a Comment
Tell me what you think