diff --git a/lib/attr_encrypted/adapters/active_record.rb b/lib/attr_encrypted/adapters/active_record.rb index 92753308..2f66942f 100644 --- a/lib/attr_encrypted/adapters/active_record.rb +++ b/lib/attr_encrypted/adapters/active_record.rb @@ -76,7 +76,7 @@ def attr_encrypted(*attrs) # attributes are handled, @attributes[attr].value is nil which # breaks attribute_was. Setting it here returns us to the expected # behavior. - if Gem::Requirement.new('>= 5.2').satisfied_by?(RAILS_VERSION) + if Gem::Requirement.new('~> 5.2').satisfied_by?(RAILS_VERSION) # This is needed support attribute_was before a record has # been saved set_attribute_was(attr, __send__(attr)) if value != __send__(attr)