Class: Iron::SearchRecord
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Iron::SearchRecord
- Defined in:
- app/models/iron/search_record.rb
Defined Under Namespace
Classes: Fts
Class Method Summary collapse
Class Method Details
.upsert!(attributes) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'app/models/iron/search_record.rb', line 15 def upsert!(attributes) record = find_by(entry_id: attributes[:entry_id], locale_id: attributes[:locale_id]) if record record.update!(attributes) record else create!(attributes) end end |