aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/base.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-05-19 16:00:04 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-05-19 16:00:04 +0000
commitaa20834222e829406bf45b133e6413bedf702229 (patch)
treee3b8cc49aad05a23675f53e892405b3c23dd8ec9 /actionpack/lib/action_view/base.rb
parent68cdcf5ed34b317ae170a3a2b8d479c6e7fe0a5b (diff)
downloadrails-aa20834222e829406bf45b133e6413bedf702229.tar.gz
rails-aa20834222e829406bf45b133e6413bedf702229.tar.bz2
rails-aa20834222e829406bf45b133e6413bedf702229.zip
Added accessors to logger, params, response, session, and headers from the view, so you can write <% logger.info "stuff" %> instead of <% @logger.info "others" %> -- more consistent with the preferred way of accessing these attributes and collections from the controller
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1307 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view/base.rb')
-rw-r--r--actionpack/lib/action_view/base.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index b0737f0f0b..998578e35b 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -122,6 +122,8 @@ module ActionView #:nodoc:
attr_reader :first_render
attr_accessor :base_path, :assigns, :template_extension
attr_accessor :controller
+
+ attr_reader :logger, :params, :response, :session, :headers
# Turn on to cache the reading of templates from the file system. Doing so means that you have to restart the server
# when changing templates, but that rendering will be faster.