app/controllers/adhoq/current_tables_controller.rb in adhoq-0.1.0 vs app/controllers/adhoq/current_tables_controller.rb in adhoq-0.1.1
- old
+ new
@@ -3,11 +3,12 @@
before_action :eager_load_models
def index
hidden_model_names = Array(Adhoq.config.hidden_model_names)
hidden_model_names << 'ActiveRecord::SchemaMigration'
+ hidden_model_names << 'ApplicationRecord'
- @ar_classes = ActiveRecord::Base.subclasses.
+ @ar_classes = ActiveRecord::Base.descendants.
reject {|klass| hidden_model_names.include?(klass.name) }.
sort_by(&:name)
render layout: false
end