Last active
August 30, 2015 04:15
-
-
Save alsemyonov/88826 to your computer and use it in GitHub Desktop.
fix for create_time_zone_conversion_attribute? problem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/activerecord_reset_sublass_fix.rb | |
module ActiveRecord | |
class Base | |
def self.reset_subclasses #:nodoc: | |
@@subclasses = {} | |
subclasses.each do |subclass| | |
next unless ActiveSupport::Dependencies.autoloaded?(subclass) | |
(@@subclasses[subclass.superclass] ||= []) << subclass | |
end | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/environments/test.rb | |
require 'activerecord_reset_subclass_fix' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
AMAZING! this completely fixed my problems, i'm beyond delighted because I hadn't a clue what was going wrong! :D