mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
extract_remote_attributes should be a private method
This commit is contained in:
committed by
Stefan Penner
parent
95b77e925f
commit
27d52e00d9
@@ -3,16 +3,6 @@ module ActionView
|
||||
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 @@ module ActionView
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user