[#2179] Simplify id_compatible?
This commit is contained in:
parent
b3cb06b7e5
commit
a42c4ade4c
1 changed files with 4 additions and 6 deletions
|
@ -31,12 +31,10 @@ class DossierSearchService
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.id_compatible?(number)
|
def self.id_compatible?(number)
|
||||||
begin
|
ActiveRecord::Type::Integer.new.serialize(number)
|
||||||
ActiveRecord::Type::Integer.new.serialize(number)
|
true
|
||||||
true
|
rescue ActiveModel::RangeError
|
||||||
rescue ActiveModel::RangeError
|
false
|
||||||
false
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.dossier_by_full_text_for_gestionnaire(search_terms, gestionnaire)
|
def self.dossier_by_full_text_for_gestionnaire(search_terms, gestionnaire)
|
||||||
|
|
Loading…
Reference in a new issue