Class: Cas::IncrementPageviewsJob

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
app/jobs/cas/increment_pageviews_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(id, type) ⇒ Object



5
6
7
8
9
# File 'app/jobs/cas/increment_pageviews_job.rb', line 5

def perform(id, type)
  if type == "content"
    Cas::Content.find(id).increment!(:pageviews)
  end
end