aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2019-01-18 15:07:22 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2019-01-18 15:07:22 -0800
commit8611b15924c5deb083221026b93792e36400bb02 (patch)
treed9f786f3eb9fe50ca21e786d4c2bc91747bfe2c4 /actionview
parent63d96adb685ae3cf464327c59a090ede25c55414 (diff)
downloadrails-8611b15924c5deb083221026b93792e36400bb02.tar.gz
rails-8611b15924c5deb083221026b93792e36400bb02.tar.bz2
rails-8611b15924c5deb083221026b93792e36400bb02.zip
Only cache the view_context_class in one place
This patch removes the instance writer of view_context_class. Subclasses may override it, but it doesn't need to be written. This also eliminates the need to cache the return value of the class level `view_context_class` method.
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/rendering.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/actionview/lib/action_view/rendering.rb b/actionview/lib/action_view/rendering.rb
index cb4327cf16..205665a8c6 100644
--- a/actionview/lib/action_view/rendering.rb
+++ b/actionview/lib/action_view/rendering.rb
@@ -55,10 +55,8 @@ module ActionView
end
end
- attr_internal_writer :view_context_class
-
def view_context_class
- @_view_context_class ||= self.class.view_context_class
+ self.class.view_context_class
end
# An instance of a view class. The default view class is ActionView::Base.