Skip to content

Commit

Permalink
Merge pull request #30 from alpaca-tc/remove-unused-code
Browse files Browse the repository at this point in the history
Deleted codes that are no longer in use.
  • Loading branch information
alpaca-tc authored Jun 11, 2023
2 parents b3bf593 + 4603649 commit 4b245cb
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 2,563 deletions.
11 changes: 1 addition & 10 deletions lib/active_record_encryption/type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Type < ActiveRecord::Type::Value
delegate :user_input_in_time_zone, to: :subtype # for ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter

def initialize(
subtype: default_value,
subtype: ActiveRecord::Type.default_value,
encryption: ActiveRecordEncryption.default_encryption.clone,
**options
)
Expand Down Expand Up @@ -37,15 +37,6 @@ def changed_in_place?(raw_old_value, value)

attr_reader :subtype, :binary, :encryptor

# NOTE: `ActiveRecord::Type.default_value` is not defined in Rails 5.0
def default_value
if ActiveRecord.gem_version < Gem::Version.create('5.1.0')
ActiveRecord::Type::Value.new
else
ActiveRecord::Type.default_value
end
end

def build_encryptor(options)
encryptor = options.delete(:encryptor)

Expand Down
Loading

0 comments on commit 4b245cb

Please sign in to comment.