Skip to content

Commit

Permalink
Suspecting this change to not be required
Browse files Browse the repository at this point in the history
  • Loading branch information
Edouard-chin committed Dec 4, 2018
1 parent 43976a9 commit 13f387c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/dummy_app/app/models/person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def load(value)
end
end

if ActiveRecord.gem_version > Gem::Version.new("5.2")
require_relative "../lib/time_zone"
attribute :time_zone, ::ActiveModel::Type::TimeZone.new
else
# if ActiveRecord.gem_version > Gem::Version.new("5.2")
# require_relative "../lib/time_zone"
# attribute :time_zone, ::ActiveModel::Type::TimeZone.new
# else
# Convert strings to TimeZone objects when assigned
def time_zone=(value)
if value.is_a? ActiveSupport::TimeZone
Expand All @@ -59,5 +59,5 @@ def time_zone=(value)
end

serialize :time_zone, TimeZoneSerializer.new
end
# end
end

0 comments on commit 13f387c

Please sign in to comment.