Skip to content
  • Jonathan Hefner's avatar
    b5248aca
    Add ActionView.deprecator · b5248aca
    Jonathan Hefner authored
    This commit adds `ActionView.deprecator` and replaces all usages of
    `ActiveSupport::Deprecation.warn` in `actionview/lib` with
    `ActionView.deprecator`.  This commit also replaces a call to Ruby's
    `Module#deprecate_constant` with Rails' `DeprecatedConstantProxy`, so
    that its deprecation behavior can be configured using
    `ActionView.deprecator`.
    
    Additionally, this commit adds `ActionView.deprecator` to
    `Rails.application.deprecators` so that it can be configured via
    settings such as `config.active_support.report_deprecations`.
    
    This commit also removes a few defunct `assert_deprecated` calls that
    were not failing because they were nested in `assert_raises`, and the
    raised error prevented checking the deprecation.  (One was mistakenly
    kept in d52d7739 when converting
    `test_render_file_with_errors` to `test_render_template_with_errors`;
    the other two were added in dd9991ba but
    not removed when the deprecation was completed in
    85ecf6e4.)
    b5248aca
    Add ActionView.deprecator
    Jonathan Hefner authored
    This commit adds `ActionView.deprecator` and replaces all usages of
    `ActiveSupport::Deprecation.warn` in `actionview/lib` with
    `ActionView.deprecator`.  This commit also replaces a call to Ruby's
    `Module#deprecate_constant` with Rails' `DeprecatedConstantProxy`, so
    that its deprecation behavior can be configured using
    `ActionView.deprecator`.
    
    Additionally, this commit adds `ActionView.deprecator` to
    `Rails.application.deprecators` so that it can be configured via
    settings such as `config.active_support.report_deprecations`.
    
    This commit also removes a few defunct `assert_deprecated` calls that
    were not failing because they were nested in `assert_raises`, and the
    raised error prevented checking the deprecation.  (One was mistakenly
    kept in d52d7739 when converting
    `test_render_file_with_errors` to `test_render_template_with_errors`;
    the other two were added in dd9991ba but
    not removed when the deprecation was completed in
    85ecf6e4.)
Loading