Can anyone tell me how to silence deprecation warinings in Rails 3?
I have a few situations where it is throwing false positives. Namely using - for loops in haml and f.error_messages from the dynamic_form plugin.
Thanks
Can anyone tell me how to silence deprecation warinings in Rails 3?
I have a few situations where it is throwing false positives. Namely using - for loops in haml and f.error_messages from the dynamic_form plugin.
Thanks
To silence all deprecation warnings you can do:
ActiveSupport::Deprecation.silenced = true
This could be placed in an initializer or in the environment file for a specific environment (e.g. to silence only in production for example.)
Or for a specific section of code, enclose it in a block:
ActiveSupport::Deprecation.silence do
# no warnings for any use of deprecated methods here
end