Skip to content

Instantly share code, notes, and snippets.

@howethomas
Created March 4, 2010 16:10
Show Gist options
  • Save howethomas/321832 to your computer and use it in GitHub Desktop.
Save howethomas/321832 to your computer and use it in GitHub Desktop.
Module.constants.select do |constant_name|
constant = eval constant_name
if not constant.nil? and constant.is_a? Class and constant.superclass == ActiveRecord::Base
constant
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment