Skip to content

Commit

Permalink
silences realy noisy deprication warning from cancancan
Browse files Browse the repository at this point in the history
  • Loading branch information
warp committed Jan 7, 2015
1 parent 3fff574 commit 450a9cb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/initializers/ignored_deprecation_warnings.rb
@@ -0,0 +1,10 @@
# silence sanitize_sql_hash_for_conditions warning from cancancan hopefully
# this will be in https://github.com/CanCanCommunity/cancancan/pull/155

if Rails.env.test?
ActiveSupport::Deprecation.behavior = lambda do |msg, stack|
unless /sanitize_sql_hash_for_conditions/ =~ msg
ActiveSupport::Deprecation::DEFAULT_BEHAVIORS[:stderr].call(msg,stack)
end
end
end

0 comments on commit 450a9cb

Please sign in to comment.