lib/blind_index/model.rb in blind_index-2.5.0 vs lib/blind_index/model.rb in blind_index-2.6.0
- old
+ new
@@ -36,10 +36,10 @@
key ||= -> { BlindIndex.index_key(table: options[:key_table] || try(:table_name) || collection_name.to_s, bidx_attribute: options[:key_attribute] || bidx_attribute, master_key: options[:master_key], encode: false) }
class_eval do
activerecord = defined?(ActiveRecord) && self < ActiveRecord::Base
- if activerecord && ActiveRecord::VERSION::MAJOR >= 6
+ if activerecord
# blind index value isn't really sensitive
# but don't need to show it in the Rails console
self.filter_attributes += [/\A#{Regexp.escape(bidx_attribute)}\z/]
end