aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller/view_paths.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-08-09 11:41:06 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-08-09 11:41:06 -0700
commit3ad26c8e489a04a03053ec9f9ea09d7c39e0f3f0 (patch)
treeccdbe6d4cf3fc01934c0940e24b8cfc9298d4af8 /actionpack/lib/abstract_controller/view_paths.rb
parent26e53a16c4efd479a9bb89202b3e1536e76158b9 (diff)
downloadrails-3ad26c8e489a04a03053ec9f9ea09d7c39e0f3f0.tar.gz
rails-3ad26c8e489a04a03053ec9f9ea09d7c39e0f3f0.tar.bz2
rails-3ad26c8e489a04a03053ec9f9ea09d7c39e0f3f0.zip
avoid object creation via useless duping and freezing
Diffstat (limited to 'actionpack/lib/abstract_controller/view_paths.rb')
-rw-r--r--actionpack/lib/abstract_controller/view_paths.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/abstract_controller/view_paths.rb b/actionpack/lib/abstract_controller/view_paths.rb
index 4980576bcd..7e11eb3cff 100644
--- a/actionpack/lib/abstract_controller/view_paths.rb
+++ b/actionpack/lib/abstract_controller/view_paths.rb
@@ -63,7 +63,7 @@ module AbstractController
# the default view path. You may also provide a custom view path
# (see ActionView::PathSet for more information)
def append_view_path(path)
- self.view_paths = view_paths + Array(path)
+ self._view_paths = view_paths + Array(path)
end
# Prepend a path to the list of view paths for this controller.
@@ -73,7 +73,7 @@ module AbstractController
# the default view path. You may also provide a custom view path
# (see ActionView::PathSet for more information)
def prepend_view_path(path)
- self.view_paths = Array(path) + view_paths
+ self._view_paths = ActionView::PathSet.new(Array(path) + view_paths)
end
# A list of all of the default view paths for this controller.
@@ -88,7 +88,6 @@ module AbstractController
# otherwise, process the parameter into a PathSet.
def view_paths=(paths)
self._view_paths = ActionView::Base.process_view_paths(paths)
- self._view_paths.freeze
end
end
end