fix: correct string quotation in city scope

- Change single quotes to double quotes for adapter name check

This change ensures consistent usage of double quotes in the
conditional check for the SQLite adapter. It does not affect
any functionality but improves code readability.
This commit is contained in:
songtianlun 2025-01-27 00:50:35 +08:00
parent adb671e668
commit f918a42619

View File

@ -38,7 +38,7 @@ class City < ApplicationRecord
}
scope :least_popular_active, -> {
if ActiveRecord::Base.connection.adapter_name.downcase == 'sqlite'
if ActiveRecord::Base.connection.adapter_name.downcase == "sqlite"
active
.joins("LEFT JOIN ahoy_events ON json_extract(ahoy_events.properties, '$.city_id') = cities.id
AND json_extract(ahoy_events.properties, '$.event_type') = 'city_view'")