Skip to content

Commit

Permalink
Ignore autogenerated HABTM models. Fixes #13
Browse files Browse the repository at this point in the history
  • Loading branch information
excid3 committed Feb 5, 2021
1 parent 3c0a4eb commit 1eb3c81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/generators/madmin/install/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ def generate_resources

private

# Skip Abstract classes, ActiveRecord::Base, and auto-generated HABTM models
def generateable_models
active_record_models.reject do |model|
model.abstract_class? || model == ActiveRecord::Base
model.abstract_class? || model == ActiveRecord::Base || model.name.start_with?("HABTM_")
end
end

Expand Down

0 comments on commit 1eb3c81

Please sign in to comment.