From 9f5cb3d3b48d0e7d702144d87208ac18778e3d38 Mon Sep 17 00:00:00 2001 From: "Erik St. Martin" Date: Sun, 24 Jan 2010 08:33:27 -0500 Subject: moving include of ScriptaculousHelper into PrototypeHelper, ActionView should know as little as possible about individual frameworks --- actionpack/lib/action_view/helpers.rb | 2 -- actionpack/lib/action_view/helpers/prototype_helper.rb | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'actionpack') diff --git a/actionpack/lib/action_view/helpers.rb b/actionpack/lib/action_view/helpers.rb index 215a697cce..080eb87445 100644 --- a/actionpack/lib/action_view/helpers.rb +++ b/actionpack/lib/action_view/helpers.rb @@ -20,7 +20,6 @@ module ActionView #:nodoc: autoload :RecordIdentificationHelper, 'action_view/helpers/record_identification_helper' autoload :RecordTagHelper, 'action_view/helpers/record_tag_helper' autoload :SanitizeHelper, 'action_view/helpers/sanitize_helper' - autoload :ScriptaculousHelper, 'action_view/helpers/scriptaculous_helper' autoload :TagHelper, 'action_view/helpers/tag_helper' autoload :TextHelper, 'action_view/helpers/text_helper' autoload :TranslationHelper, 'action_view/helpers/translation_helper' @@ -53,7 +52,6 @@ module ActionView #:nodoc: include RecordIdentificationHelper include RecordTagHelper include SanitizeHelper - include ScriptaculousHelper include TagHelper include TextHelper include TranslationHelper diff --git a/actionpack/lib/action_view/helpers/prototype_helper.rb b/actionpack/lib/action_view/helpers/prototype_helper.rb index 2bd6afba56..d861810f19 100644 --- a/actionpack/lib/action_view/helpers/prototype_helper.rb +++ b/actionpack/lib/action_view/helpers/prototype_helper.rb @@ -1,6 +1,7 @@ require 'set' require 'active_support/json' require 'active_support/core_ext/object/returning' +require 'action_view/helpers/scriptaculous_helper' module ActionView module Helpers @@ -73,6 +74,8 @@ module ActionView # See JavaScriptGenerator for information on updating multiple elements # on the page in an Ajax response. module PrototypeHelper + include ScriptaculousHelper + unless const_defined? :CALLBACKS CALLBACKS = Set.new([ :create, :uninitialized, :loading, :loaded, :interactive, :complete, :failure, :success ] + -- cgit v1.2.3