class RuboCop::Cop::Rails::HttpPositionalArguments
def convert_hash_data(data, type)
def convert_hash_data(data, type) return '' if data.hash_type? && data.empty? hash_data = if data.hash_type? format('{ %<data>s }', data: data.pairs.map(&:source).join(', ')) else # user supplies an object, # no need to surround with braces data.source end format(', %<type>s: %<hash_data>s', type: type, hash_data: hash_data) end