@@ -144,6 +144,31 @@ class Parameters
144
144
145
145
cattr_accessor :action_on_unpermitted_parameters , instance_accessor : false
146
146
147
+ ##
148
+ # :method: deep_merge
149
+ #
150
+ # :call-seq:
151
+ # deep_merge(other_hash, &block)
152
+ #
153
+ # Returns a new +ActionController::Parameters+ instance with +self+ and +other_hash+ merged recursively.
154
+ #
155
+ # Like with <tt>Hash#merge</tt> in the standard library, a block can be provided
156
+ # to merge values.
157
+ #
158
+ #--
159
+ # Implemented by ActiveSupport::DeepMergeable#deep_merge.
160
+
161
+ ##
162
+ # :method: deep_merge!
163
+ #
164
+ # :call-seq:
165
+ # deep_merge!(other_hash, &block)
166
+ #
167
+ # Same as +#deep_merge+, but modifies +self+.
168
+ #
169
+ #--
170
+ # Implemented by ActiveSupport::DeepMergeable#deep_merge!.
171
+
147
172
##
148
173
# :method: as_json
149
174
#
@@ -866,28 +891,7 @@ def merge!(other_hash, &block)
866
891
self
867
892
end
868
893
869
- ##
870
- # :method: deep_merge
871
- # :call-seq: deep_merge(other_hash, &block)
872
- #
873
- # Returns a new +ActionController::Parameters+ instance with +self+ and +other_hash+ merged recursively.
874
- #
875
- # Like with +Hash#merge+ in the standard library, a block can be provided
876
- # to merge values.
877
- #
878
- #--
879
- # Implemented by ActiveSupport::DeepMergeable#deep_merge.
880
-
881
- ##
882
- # :method: deep_merge!
883
- # :call-seq: deep_merge!(other_hash, &block)
884
- #
885
- # Same as +#deep_merge+, but modifies +self+.
886
- #
887
- #--
888
- # Implemented by ActiveSupport::DeepMergeable#deep_merge!.
889
-
890
- def deep_merge? ( other_hash ) # :nodoc
894
+ def deep_merge? ( other_hash ) # :nodoc:
891
895
other_hash . is_a? ( ActiveSupport ::DeepMergeable )
892
896
end
893
897
0 commit comments