aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/base.rb
diff options
context:
space:
mode:
authorCarlhuda <carlhuda@engineyard.com>2010-03-17 16:28:05 -0700
committerCarlhuda <carlhuda@engineyard.com>2010-03-17 16:29:35 -0700
commitd9375f3f302a5d1856ad57946c7263d4e6a45a2a (patch)
tree76769a45da7b1315df173976067ff37edcb59b49 /actionpack/lib/action_view/base.rb
parent7872fa9a4397c450ee22c511966e149d594d153e (diff)
downloadrails-d9375f3f302a5d1856ad57946c7263d4e6a45a2a.tar.gz
rails-d9375f3f302a5d1856ad57946c7263d4e6a45a2a.tar.bz2
rails-d9375f3f302a5d1856ad57946c7263d4e6a45a2a.zip
Modify assert_template to use notifications. Also, remove ActionController::Base#template since it is no longer needed.
Diffstat (limited to 'actionpack/lib/action_view/base.rb')
-rw-r--r--actionpack/lib/action_view/base.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index 326b79f9bf..4d9f53cf95 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -196,7 +196,7 @@ module ActionView #:nodoc:
end
attr_accessor :base_path, :assigns, :template_extension, :lookup_context
- attr_internal :captures, :request, :layout, :controller, :template, :config
+ attr_internal :captures, :request, :controller, :template, :config
delegate :find_template, :template_exists?, :formats, :formats=, :locale, :locale=,
:view_paths, :view_paths=, :with_fallbacks, :update_details, :to => :lookup_context
@@ -206,6 +206,11 @@ module ActionView #:nodoc:
delegate :logger, :to => :controller, :allow_nil => true
+ # TODO: HACK FOR RJS
+ def view_context
+ self
+ end
+
def self.xss_safe? #:nodoc:
true
end
@@ -254,7 +259,7 @@ module ActionView #:nodoc:
@helpers = self.class.helpers || Module.new
@_controller = controller
- @_config = ActiveSupport::InheritableOptions.new(controller.config) if controller
+ @_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