assemblymade/coderwall

View on GitHub
app/services/user_protips_service.rb

Summary

Maintainability
A
0 mins
Test Coverage
module UserProtipsService
  def self.deindex_all_for(user)
    user.protips.each do |protip|
      protip.mark_as_spam
      ProtipIndexer.new(protip).remove
    end
  end

  def self.reindex_all_for(user)
    user.protips.each do |protip|
      ProtipIndexer.new(protip).store
    end
  end
end