Class: Cangaroo::PollTimestamp

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/cangaroo/poll_timestamp.rb

Class Method Summary collapse

Class Method Details

.for_class(klass) ⇒ Object



9
10
11
12
13
14
# File 'app/models/cangaroo/poll_timestamp.rb', line 9

def self.for_class(klass)
  where(
    job: klass.to_s,
    connection: Cangaroo::Connection.find_by!(name: klass.connection)
  ).first_or_initialize
end