Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions lib/tire_async_index/workers/update_index.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ def process(action_type, class_name, id)

case action_type.to_sym
when :update
object = klass.send(get_finder_method(klass), id)

if object.present? && object.respond_to?(:tire)
object.tire.update_index
begin
object = klass.send(get_finder_method(klass), id)
if object.present? && object.respond_to?(:tire)
object.tire.update_index
end
rescue => e
end
when :delete

Expand Down