@@ -78,7 +78,7 @@ def find(*ids, **options)
7878 # # Find all the tweets using hash key and range key with consistent read
7979 # Tweet.find_all([['1', 'red'], ['1', 'green']], consistent_read: true)
8080 def find_all ( ids , options = { } )
81- ActiveSupport :: Deprecation . warn ( '[Dynamoid] .find_all is deprecated! Call .find instead of' )
81+ Dynamoid . deprecator . warn ( '[Dynamoid] .find_all is deprecated! Call .find instead of' )
8282
8383 _find_all ( ids , options )
8484 end
@@ -100,7 +100,7 @@ def find_all(ids, options = {})
100100 #
101101 # @since 0.2.0
102102 def find_by_id ( id , options = { } )
103- ActiveSupport :: Deprecation . warn ( '[Dynamoid] .find_by_id is deprecated! Call .find instead of' , caller [ 1 ..- 1 ] )
103+ Dynamoid . deprecator . warn ( '[Dynamoid] .find_by_id is deprecated! Call .find instead of' )
104104
105105 _find_by_id ( id , options )
106106 end
@@ -180,7 +180,7 @@ def _find_by_id(id, options = {})
180180 # @param range_key [Scalar value] range key of the object to find
181181 #
182182 def find_by_composite_key ( hash_key , range_key , options = { } )
183- ActiveSupport :: Deprecation . warn ( '[Dynamoid] .find_by_composite_key is deprecated! Call .find instead of' )
183+ Dynamoid . deprecator . warn ( '[Dynamoid] .find_by_composite_key is deprecated! Call .find instead of' )
184184
185185 _find_by_id ( hash_key , options . merge ( range_key : range_key ) )
186186 end
@@ -207,7 +207,7 @@ def find_by_composite_key(hash_key, range_key, options = {})
207207 #
208208 # @return [Array] an array of all matching items
209209 def find_all_by_composite_key ( hash_key , options = { } )
210- ActiveSupport :: Deprecation . warn ( '[Dynamoid] .find_all_composite_key is deprecated! Call .where instead of' )
210+ Dynamoid . deprecator . warn ( '[Dynamoid] .find_all_composite_key is deprecated! Call .where instead of' )
211211
212212 Dynamoid . adapter . query ( table_name , options . merge ( hash_value : hash_key ) ) . flat_map { |i | i } . collect do |item |
213213 from_database ( item )
@@ -237,7 +237,7 @@ def find_all_by_composite_key(hash_key, options = {})
237237 # @param options [Hash] conditions on range key e.g. +{ "rank.lte": 10 }, query filter, projected keys, scan_index_forward etc.
238238 # @return [Array] an array of all matching items
239239 def find_all_by_secondary_index ( hash , options = { } )
240- ActiveSupport :: Deprecation . warn ( '[Dynamoid] .find_all_by_secondary_index is deprecated! Call .where instead of' )
240+ Dynamoid . deprecator . warn ( '[Dynamoid] .find_all_by_secondary_index is deprecated! Call .where instead of' )
241241
242242 range = options [ :range ] || { }
243243 hash_key_field , hash_key_value = hash . first
@@ -291,7 +291,7 @@ def find_all_by_secondary_index(hash, options = {})
291291 def method_missing ( method , *args )
292292 # Cannot use Symbol#start_with? because it was introduced in Ruby 2.7, but we support Ruby >= 2.3
293293 if method . to_s . start_with? ( 'find' )
294- ActiveSupport :: Deprecation . warn ( "[Dynamoid] .#{ method } is deprecated! Call .where instead of" )
294+ Dynamoid . deprecator . warn ( "[Dynamoid] .#{ method } is deprecated! Call .where instead of" )
295295
296296 finder = method . to_s . split ( '_by_' ) . first
297297 attributes = method . to_s . split ( '_by_' ) . last . split ( '_and_' )
0 commit comments