Skip to content

Commit

Permalink
extract_remote_attributes should be a private method
Browse files Browse the repository at this point in the history
  • Loading branch information
stevestmartin authored and stefanpenner committed Jan 27, 2010
1 parent 95b77e9 commit 27d52e0
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions actionpack/lib/action_view/helpers/ajax_helper.rb
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 27d52e0

Please sign in to comment.