Skip to content

Commit

Permalink
Handle edge cases in development and test on classes that become unde…
Browse files Browse the repository at this point in the history
…fined
  • Loading branch information
bdurand committed Aug 26, 2024
1 parent 43b31dc commit f792592
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.2.4

### Fixed

- Fixed issue with `sync_all!` finding obsolete classes that are no longer defined as support tables in development or test environments.

## 1.2.3

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.3
1.2.4
1 change: 1 addition & 0 deletions lib/support_table_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ def support_table_classes(*extra_classes)
active_record_classes = ActiveRecord::Base.descendants.reject { |klass| klass.name.nil? }
active_record_classes.sort_by(&:name).each do |klass|
next unless klass.include?(SupportTableData)
next unless klass.instance_variable_defined?(:@support_table_data_files) && klass.instance_variable_get(:@support_table_data_files).is_a?(Array)
next if klass.abstract_class?
next if classes.include?(klass)
classes << klass
Expand Down

0 comments on commit f792592

Please sign in to comment.