aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-03 17:46:09 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-04 11:58:42 -0300
commit34bcbcf35701ca44be559ff391535c0dd865c333 (patch)
treeeb3e76564f960fb0ae217e3ce77114c6a50fd019 /actionview
parent92e27d30d8112962ee068f7b14aa7b10daf0c976 (diff)
downloadrails-34bcbcf35701ca44be559ff391535c0dd865c333.tar.gz
rails-34bcbcf35701ca44be559ff391535c0dd865c333.tar.bz2
rails-34bcbcf35701ca44be559ff391535c0dd865c333.zip
Remove deprecated `AbstractController::Base::parent_prefixes`
Diffstat (limited to 'actionview')
-rw-r--r--actionview/CHANGELOG.md4
-rw-r--r--actionview/lib/action_view/view_paths.rb22
-rw-r--r--actionview/test/actionpack/abstract/abstract_controller_test.rb16
3 files changed, 7 insertions, 35 deletions
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md
index ec92f21d81..72fc6e3c73 100644
--- a/actionview/CHANGELOG.md
+++ b/actionview/CHANGELOG.md
@@ -1,3 +1,7 @@
+* Remove deprecated `AbstractController::Base::parent_prefixes`.
+
+ *Rafael Mendonça França*
+
* Default translations that have a lower precedence than a html safe default,
but are not themselves safe, should not be marked as html_safe.
diff --git a/actionview/lib/action_view/view_paths.rb b/actionview/lib/action_view/view_paths.rb
index 2e203a7590..492f67f45d 100644
--- a/actionview/lib/action_view/view_paths.rb
+++ b/actionview/lib/action_view/view_paths.rb
@@ -16,14 +16,9 @@ module ActionView
module ClassMethods
def _prefixes # :nodoc:
@_prefixes ||= begin
- deprecated_prefixes = handle_deprecated_parent_prefixes
- if deprecated_prefixes
- deprecated_prefixes
- else
- return local_prefixes if superclass.abstract?
-
- local_prefixes + superclass._prefixes
- end
+ return local_prefixes if superclass.abstract?
+
+ local_prefixes + superclass._prefixes
end
end
@@ -34,17 +29,6 @@ module ActionView
def local_prefixes
[controller_path]
end
-
- def handle_deprecated_parent_prefixes # TODO: remove in 4.3/5.0.
- return unless respond_to?(:parent_prefixes)
-
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
- Overriding `ActionController::Base::parent_prefixes` is deprecated,
- override `.local_prefixes` instead.
- MSG
-
- local_prefixes + parent_prefixes
- end
end
# The prefixes used in render "foo" shortcuts.
diff --git a/actionview/test/actionpack/abstract/abstract_controller_test.rb b/actionview/test/actionpack/abstract/abstract_controller_test.rb
index e653b12d32..fac0a1fbb7 100644
--- a/actionview/test/actionpack/abstract/abstract_controller_test.rb
+++ b/actionview/test/actionpack/abstract/abstract_controller_test.rb
@@ -182,22 +182,6 @@ module AbstractController
end
end
- class DeprecatedParentPrefixes < OverridingLocalPrefixes
- def self.parent_prefixes
- ["abstract_controller/testing/me3"]
- end
- end
-
- class DeprecatedParentPrefixesTest < ActiveSupport::TestCase # TODO: remove me in 5.0/4.3.
- test "overriding .parent_prefixes is deprecated" do
- @controller = DeprecatedParentPrefixes.new
- assert_deprecated do
- @controller.process(:index)
- end
- assert_equal "Hello from me3/index.erb", @controller.response_body
- end
- end
-
# Test rendering with layouts
# ====
# self._layout is used when defined