Commit bf0013a2 by Đường Sỹ Hoàng

Fix Job model

parent b0f70dc4
...@@ -4,7 +4,7 @@ class Job < ApplicationRecord ...@@ -4,7 +4,7 @@ class Job < ApplicationRecord
has_many :industry_jobs has_many :industry_jobs
has_many :cities, through: :city_jobs has_many :cities, through: :city_jobs
has_many :industries, through: :industry_jobs has_many :industries, through: :industry_jobs
has_many :apply_jobs has_many :applies
def self.latest_jobs def self.latest_jobs
@latest ||= order(created_at: :desc).take(Settings.top.job.limit) @latest ||= order(created_at: :desc).take(Settings.top.job.limit)
......
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