aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/base.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-04-03 10:56:15 -0700
committerXavier Noria <fxn@hashref.com>2010-04-03 10:56:15 -0700
commit11161e6c96fb6686a33e05ead106b96089ff9790 (patch)
tree35d5618f1a866ce8ba11efd8e6851d2fd7bbf5fc /actionpack/lib/action_view/base.rb
parent4996d1a445acd965d0064500ad00d692a742f669 (diff)
parent467d251c3dcbd3e4dd1e785a21d63535b795a64c (diff)
downloadrails-11161e6c96fb6686a33e05ead106b96089ff9790.tar.gz
rails-11161e6c96fb6686a33e05ead106b96089ff9790.tar.bz2
rails-11161e6c96fb6686a33e05ead106b96089ff9790.zip
Merge commit 'rails/master'
Diffstat (limited to 'actionpack/lib/action_view/base.rb')
-rw-r--r--actionpack/lib/action_view/base.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index a9b0715b2e..fde61e9df9 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -168,6 +168,8 @@ module ActionView #:nodoc:
remove_method :helpers
attr_reader :helpers
+ class_attribute :_router
+
class << self
delegate :erb_trim_mode=, :to => 'ActionView::Template::Handlers::ERB'
delegate :logger, :to => 'ActionController::Base', :allow_nil => true
@@ -204,7 +206,10 @@ module ActionView #:nodoc:
@assigns = assigns_for_first_render.each { |key, value| instance_variable_set("@#{key}", value) }
@helpers = self.class.helpers || Module.new
- @_controller = controller
+ if @_controller = controller
+ @_request = controller.request if controller.respond_to?(:request)
+ end
+
@_config = ActiveSupport::InheritableOptions.new(controller.config) if controller && controller.respond_to?(:config)
@_content_for = Hash.new { |h,k| h[k] = ActiveSupport::SafeBuffer.new }
@_virtual_path = nil