diff --git a/app/models/job_skill.rb b/app/models/job_skill.rb index 8e47fbe..e487edc 100644 --- a/app/models/job_skill.rb +++ b/app/models/job_skill.rb @@ -3,25 +3,29 @@ class JobSkill < ApplicationRecord belongs_to :job - pg_search_scope :en_search, - against: :name_en, - using: { - tsearch: { - prefix: true, - dictionary: "simple" - } - } + pg_search_scope :en_search, + against: :name_en, + using: { + tsearch: { + prefix: true, + dictionary: "simple", + }, + } - pg_search_scope :jp_search, - against: :name_jp, - using: { - tsearch: { - prefix: true, - dictionary: "simple" - } - } + pg_search_scope :jp_search, + against: :name_jp, + using: { + tsearch: { + prefix: true, + dictionary: "simple", + }, + } def display_resource(skill) skill.name_en end + + def ==(other) + self.class == other.class && @id == other.id + end end