Add == and update search
This commit is contained in:
parent
aa5d2451a8
commit
d1eba7aed8
1 changed files with 20 additions and 16 deletions
|
|
@ -8,8 +8,8 @@ class JobSkill < ApplicationRecord
|
||||||
using: {
|
using: {
|
||||||
tsearch: {
|
tsearch: {
|
||||||
prefix: true,
|
prefix: true,
|
||||||
dictionary: "simple"
|
dictionary: "simple",
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
pg_search_scope :jp_search,
|
pg_search_scope :jp_search,
|
||||||
|
|
@ -17,11 +17,15 @@ class JobSkill < ApplicationRecord
|
||||||
using: {
|
using: {
|
||||||
tsearch: {
|
tsearch: {
|
||||||
prefix: true,
|
prefix: true,
|
||||||
dictionary: "simple"
|
dictionary: "simple",
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
def display_resource(skill)
|
def display_resource(skill)
|
||||||
skill.name_en
|
skill.name_en
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def ==(other)
|
||||||
|
self.class == other.class && @id == other.id
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue