diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dbebc6..271aa61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/VERSION b/VERSION index 0495c4a..e8ea05d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.3 +1.2.4 diff --git a/lib/support_table_data.rb b/lib/support_table_data.rb index 022a65f..400d471 100644 --- a/lib/support_table_data.rb +++ b/lib/support_table_data.rb @@ -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