module Hashid::Rails::ClassMethods
def decode_id(ids, fallback: false)
-
fallback
(Boolean
) -- indicates whether to return the passed in -
ids
(String, Integer, Array
) -- id(s) to decode.
def decode_id(ids, fallback: false) if ids.is_a?(Array) ids.map { |id| hashid_decode(id, fallback: fallback) } else hashid_decode(ids, fallback: fallback) end end