mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #28334 from tjschuck/document_delegated_params_methods
Document delegated public methods on AC::Parameters
This commit is contained in:
commit
a906c8c75a
1 changed files with 71 additions and 0 deletions
|
@ -112,6 +112,77 @@ module ActionController
|
|||
|
||||
cattr_accessor :action_on_unpermitted_parameters, instance_accessor: false
|
||||
|
||||
##
|
||||
# :method: as_json
|
||||
#
|
||||
# :call-seq:
|
||||
# as_json(options=nil)
|
||||
#
|
||||
# Returns a hash that can be used as the JSON representation for the params.
|
||||
|
||||
##
|
||||
# :method: empty?
|
||||
#
|
||||
# :call-seq:
|
||||
# empty?()
|
||||
#
|
||||
# Returns true if the object has no key/value pairs.
|
||||
|
||||
##
|
||||
# :method: has_key?
|
||||
#
|
||||
# :call-seq:
|
||||
# has_key?(key)
|
||||
#
|
||||
# Returns true if the given key is present in the parameters.
|
||||
|
||||
##
|
||||
# :method: has_value?
|
||||
#
|
||||
# :call-seq:
|
||||
# has_value?(value)
|
||||
#
|
||||
# Returns true if the given value is present for some key in the parameters.
|
||||
|
||||
##
|
||||
# :method: include?
|
||||
#
|
||||
# :call-seq:
|
||||
# include?(key)
|
||||
#
|
||||
# Returns true if the given key is present in the parameters.
|
||||
|
||||
##
|
||||
# :method: key?
|
||||
#
|
||||
# :call-seq:
|
||||
# key?(key)
|
||||
#
|
||||
# Returns true if the given key is present in the parameters.
|
||||
|
||||
##
|
||||
# :method: keys
|
||||
#
|
||||
# :call-seq:
|
||||
# keys()
|
||||
#
|
||||
# Returns a new array of the keys of the parameters.
|
||||
|
||||
##
|
||||
# :method: value?
|
||||
#
|
||||
# :call-seq:
|
||||
# value?(value)
|
||||
#
|
||||
# Returns true if the given value is present for some key in the parameters.
|
||||
|
||||
##
|
||||
# :method: values
|
||||
#
|
||||
# :call-seq:
|
||||
# values()
|
||||
#
|
||||
# Returns a new array of the values of the parameters.
|
||||
delegate :keys, :key?, :has_key?, :values, :has_value?, :value?, :empty?, :include?,
|
||||
:as_json, to: :@parameters
|
||||
|
||||
|
|
Loading…
Reference in a new issue