Skip to content

Commit

Permalink
Removed all helpers from PrototypeHelper that are implemented in Ajax…
Browse files Browse the repository at this point in the history
…Helper. Modified tests that extended with PrototypeHelper to now extend using AjaxHelper. AjaxHelper is now included by default in view helper
  • Loading branch information
erikstmartin authored and stefanpenner committed Jan 27, 2010
1 parent 5462caf commit 565a696
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 646 deletions.
4 changes: 2 additions & 2 deletions actionpack/lib/action_view/helpers.rb
Expand Up @@ -15,7 +15,7 @@ module Helpers #:nodoc:
autoload :FormTagHelper, 'action_view/helpers/form_tag_helper'
autoload :JavaScriptHelper, 'action_view/helpers/javascript_helper'
autoload :NumberHelper, 'action_view/helpers/number_helper'
autoload :PrototypeHelper, 'action_view/helpers/prototype_helper'
autoload :AjaxHelper, 'action_view/helpers/ajax_helper'
autoload :RawOutputHelper, 'action_view/helpers/raw_output_helper'
autoload :RecordIdentificationHelper, 'action_view/helpers/record_identification_helper'
autoload :RecordTagHelper, 'action_view/helpers/record_tag_helper'
Expand Down Expand Up @@ -48,7 +48,7 @@ module ClassMethods
include FormTagHelper
include JavaScriptHelper
include NumberHelper
include PrototypeHelper
include AjaxHelper
include RawOutputHelper
include RecordIdentificationHelper
include RecordTagHelper
Expand Down
5 changes: 4 additions & 1 deletion actionpack/lib/action_view/helpers/ajax_helper.rb
@@ -1,7 +1,9 @@
module ActionView
module Helpers
module AjaxHelper
include PrototypeHelper
# Included for backwards compatibility / RJS functionality
# Rails classes should not be aware of individual JS frameworks
include PrototypeHelper

def remote_form_for(record_or_name_or_array, *args, &proc)
options = args.extract_options!
Expand All @@ -19,6 +21,7 @@ def form_remote_tag(options = {}, &block)
attributes.merge!(options)

url = attributes.delete("data-url")
attributes.delete(:builder)
form_tag(attributes.delete(:action) || url, attributes, &block)
end

Expand Down

0 comments on commit 565a696

Please sign in to comment.