Use :send to invoke :remove_instance_variable on PaperTrail; prevents errors on Ruby19
This commit is contained in:
parent
6411f24895
commit
9402addcb2
|
@ -103,10 +103,10 @@ end
|
|||
|
||||
# Ensure `ProtectedAttributes` gem gets required if it is available before the `Version` class gets loaded in
|
||||
unless PaperTrail.active_record_protected_attributes?
|
||||
PaperTrail.remove_instance_variable(:@active_record_protected_attributes)
|
||||
PaperTrail.send(:remove_instance_variable, :@active_record_protected_attributes)
|
||||
begin
|
||||
require 'protected_attributes'
|
||||
rescue LoadError; end # will rescue if ProtectedAttributes gem is not available
|
||||
rescue LoadError; end # will rescue if `ProtectedAttributes` gem is not available
|
||||
end
|
||||
|
||||
require 'paper_trail/version'
|
||||
|
|
|
@ -3,16 +3,11 @@ ENV["RAILS_ENV"] = "test"
|
|||
|
||||
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
||||
require "rails/test_help"
|
||||
|
||||
#ActionMailer::Base.delivery_method = :test
|
||||
#ActionMailer::Base.perform_deliveries = true
|
||||
#ActionMailer::Base.default_url_options[:host] = "test.com"
|
||||
|
||||
Rails.backtrace_cleaner.remove_silencers!
|
||||
|
||||
require 'shoulda'
|
||||
require 'ffaker'
|
||||
|
||||
Rails.backtrace_cleaner.remove_silencers!
|
||||
|
||||
# Run any available migration
|
||||
ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__)
|
||||
|
||||
|
|
Loading…
Reference in New Issue