Sha256: c862777c871df82bef15a40c6d2eb145a546f2a2f029f5eea521d7a7eda3e7dc
Contents?: true
Size: 312 Bytes
Versions: 1
Compression:
Stored size: 312 Bytes
Contents
module AdminData module ModelFinder extend self def models ActiveRecord::Base.send(:subclasses).map do | klass | namespaced_models(klass).push(klass.name) end.flatten.sort end def namespaced_models(model_klass) model_klass.subclasses.map(&:name) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
the_jobbook_admin_data-1.3.0a | lib/admin_data/model_finder.rb |