diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-04-21 11:39:46 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-04-21 11:53:14 +0100 |
commit | a04f0228776e7616c372f867a1212b5798cde80a (patch) | |
tree | 39f364456fa4decbb44bdad5019541d7ae7c7edb /actionpack/lib/action_view | |
parent | f757f5838818ce35f7927a10a8cda6f9583869c5 (diff) | |
download | rails-a04f0228776e7616c372f867a1212b5798cde80a.tar.gz rails-a04f0228776e7616c372f867a1212b5798cde80a.tar.bz2 rails-a04f0228776e7616c372f867a1212b5798cde80a.zip |
Delegate ivars to controller instead of copying
Reduce number of instance variables being copied from controller to
view. Instead, delegate them to controller instance.
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/base.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb index 12dd7d2bc9..4ed20fec89 100644 --- a/actionpack/lib/action_view/base.rb +++ b/actionpack/lib/action_view/base.rb @@ -156,9 +156,6 @@ module ActionView #:nodoc: attr_reader :finder attr_accessor :base_path, :assigns, :template_extension, :first_render attr_accessor :controller - - attr_reader :logger, :response, :headers - attr_internal :cookies, :flash, :headers, :params, :request, :response, :session attr_writer :template_format attr_accessor :current_render_extension @@ -185,7 +182,10 @@ module ActionView #:nodoc: @@erb_variable = '_erbout' cattr_accessor :erb_variable - delegate :request_forgery_protection_token, :to => :controller + attr_internal :request + + delegate :request_forgery_protection_token, :template, :params, :session, :cookies, :response, :headers, + :flash, :logger, :to => :controller module CompiledTemplates #:nodoc: # holds compiled template code @@ -222,7 +222,6 @@ module ActionView #:nodoc: @assigns = assigns_for_first_render @assigns_added = nil @controller = controller - @logger = controller && controller.logger @finder = TemplateFinder.new(self, view_paths) end |