Skip to content

Commit

Permalink
Don't convert string to binary in Rails 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alpaca-tc committed Nov 8, 2023
1 parent 3e25dca commit b6c06b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/active_record_encryption/type/binary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module ActiveRecordEncryption
class Type
class Binary < ActiveModel::Type::Binary
def cast(value)
return super if ActiveRecord::VERSION::STRING <= '7.1.0'
return super if ActiveRecord::VERSION::STRING < '7.0.0'

if value.is_a?(Data)
value.to_s
Expand Down

0 comments on commit b6c06b4

Please sign in to comment.