Closed jakubkosinski closed 1 year ago
scope :with_ticket_types, -> { group('shops.id').joins('LEFT JOIN foos ON foos.bar_id = bars.id').select('foos.*, COUNT(bars.id) count') }
scope( :with_ticket_types, -> { group "shops.id".joins "LEFT JOIN foos ON foos.bar_id = bars.id".select("foos.*, COUNT(bars.id) count") } )
There are no brackets over group and join calls so that invalid syntax is being produced - joins & select are called on a string instances.
group
join
joins
select
Input file
Rubyfmt's output
This breaks because
There are no brackets over
group
andjoin
calls so that invalid syntax is being produced -joins
&select
are called on a string instances.