Sha256: 42e1f9e57329f63e038a1e30d010ba5128f78e328c58ed5f2a83cc0370d28e66
Contents?: true
Size: 957 Bytes
Versions: 10
Compression:
Stored size: 957 Bytes
Contents
# SerializedAttributes is deprecated in Rails 4.2.x, and will be removed in # Rails 5. PaperTrail spews a ton of deprecation warnings about this issue, # and while a fix for this issue is in their pending (as of 6/30/15) 4.0 # release, this patch will silence the warning from clogging up Calagator test # runs. # # More info: https://github.com/airblade/paper_trail/issues/416 # # TODO: when Calagator uses PaperTrail 4.0 or higher, remove this initializer if PaperTrail.version.to_f < 4.0 current_behavior = ActiveSupport::Deprecation.behavior ActiveSupport::Deprecation.behavior = lambda do |message, callstack| return if message =~ /`serialized_attributes` is deprecated without replacement/ && callstack.any? { |m| m =~ /paper_trail/ } Array.wrap(current_behavior).each { |behavior| behavior.call(message, callstack) } end else warn 'FIXME: PaperTrail initializer to suppress deprecation warnings can be safely removed.' end
Version data entries
10 entries across 10 versions & 2 rubygems