refresh

parent 77497c1e
...@@ -5,7 +5,6 @@ class City < ApplicationRecord ...@@ -5,7 +5,6 @@ class City < ApplicationRecord
VIETNAM = 1 VIETNAM = 1
FOREIGN = 0 FOREIGN = 0
scope :top_city, -> { joins(:jobs).group(:city_id).order('count(job_id) DESC').limit(9) } scope :top_city, -> { joins(:jobs).group(:city_id).order('count(job_id) DESC').limit(9) }
scope :location, ->(number) { joins(:jobs).group(:city_id).order('count(job_id) DESC').where(location: number) } scope :location, ->(number) { joins(:jobs).group(:city_id).order('count(job_id) DESC').where(location: number) }
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment