Skip to content

Commit

Permalink
Merge pull request #26915 from jules2689/time-zone-conversion-inherit…
Browse files Browse the repository at this point in the history
…ed-bug

Fixes an issue where time_zone_conversion that causes an exception in…
  • Loading branch information
sgrif committed Oct 27, 2016
2 parents 7506f33 + 02063a8 commit 928f466
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ module ClassMethods
private

def inherited(subclass)
super
# We need to apply this decorator here, rather than on module inclusion. The closure
# created by the matcher would otherwise evaluate for `ActiveRecord::Base`, not the
# sub class being decorated. As such, changes to `time_zone_aware_attributes`, or
Expand All @@ -80,7 +81,6 @@ def inherited(subclass)
TimeZoneConverter.new(type)
end
end
super
end

def create_time_zone_conversion_attribute?(name, cast_type)
Expand Down

0 comments on commit 928f466

Please sign in to comment.