Class: Panda::CMS::RecordVisitJob

Inherits:
ApplicationJob show all
Defined in:
app/jobs/panda/cms/record_visit_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(path:, user_id: nil, redirect_id: nil, page_id: nil, user_agent: nil, ip_address: nil, referer: nil, params: []) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'app/jobs/panda/cms/record_visit_job.rb', line 8

def perform(
  path:,
  user_id: nil,
  redirect_id: nil,
  page_id: nil,
  user_agent: nil,
  ip_address: nil,
  referer: nil,
  params: []
)
  Panda::CMS::Visit.create!(
    url: path,
    user_id: user_id,
    redirect_id: redirect_id,
    page_id: page_id,
    user_agent: user_agent,
    ip_address: ip_address,
    referrer: referer, # TODO: Fix the naming of this column
    params: params
  )
end