Permalink
Browse files

extract_remote_attributes should be a private method

  • Loading branch information...
1 parent 95b77e9 commit 27d52e00d90604af845bcfdcc23cf54cd652e3e0 @stevestmartin stevestmartin committed with stefanpenner Jan 23, 2010
Showing with 10 additions and 10 deletions.
  1. +10 −10 actionpack/lib/action_view/helpers/ajax_helper.rb
@@ -3,16 +3,6 @@ module Helpers
module AjaxHelper
include UrlHelper
- def extract_remote_attributes!(options)
- attributes = options.delete(:html) || {}
-
- attributes.merge!(extract_update_attributes!(options))
- attributes.merge!(extract_request_attributes!(options))
- attributes["data-js-type"] = options.delete(:js_type) || "remote"
-
- attributes
- end
-
def remote_form_for(record_or_name_or_array, *args, &proc)
options = args.extract_options!
object_name = extract_object_name_for_form!(args, options, record_or_name_or_array)
@@ -119,6 +109,16 @@ def button_to_remote(name, options = {}, html_options = {})
private
+ def extract_remote_attributes!(options)
+ attributes = options.delete(:html) || {}
+
+ attributes.merge!(extract_update_attributes!(options))
+ attributes.merge!(extract_request_attributes!(options))
+ attributes["data-js-type"] = options.delete(:js_type) || "remote"
+
+ attributes
+ end
+
def extract_request_attributes!(options)
attributes = {}
attributes["data-method"] = options.delete(:method)

0 comments on commit 27d52e0

Please sign in to comment.