Class: CallRailData

Inherits:
ApplicationRecord show all
Defined in:
app/models/call_rail_data.rb

Overview

== Schema Information

Table name: call_rail_data
Database name: primary

id :bigint not null, primary key
answered :boolean
campaign :string
customer_city :string
customer_country :string
customer_name :string
customer_number :string
customer_state :string
gclid :string
keywords :string
landing_page_url :string
matched :boolean default(FALSE)
processed :boolean default(FALSE)
start_time :datetime
tracking_phone_number :string
callrail_id :string

Class Method Summary collapse

Methods inherited from ApplicationRecord

ransackable_associations, ransackable_attributes, ransackable_scopes, ransortable_attributes, #to_relation

Methods included from Models::EventPublishable

#publish_event

Class Method Details

.matchedActiveRecord::Relation<CallRailData>

A relation of CallRailData that are matched. Active Record Scope

Returns:

See Also:



28
# File 'app/models/call_rail_data.rb', line 28

scope :matched, -> { where(processed: true) }

.not_processedActiveRecord::Relation<CallRailData>

A relation of CallRailData that are not processed. Active Record Scope

Returns:

See Also:



25
# File 'app/models/call_rail_data.rb', line 25

scope :not_processed, -> { where(processed: false) }

.processedActiveRecord::Relation<CallRailData>

A relation of CallRailData that are processed. Active Record Scope

Returns:

See Also:



26
# File 'app/models/call_rail_data.rb', line 26

scope :processed, -> { where(processed: true) }

.unmatchedActiveRecord::Relation<CallRailData>

A relation of CallRailData that are unmatched. Active Record Scope

Returns:

See Also:



27
# File 'app/models/call_rail_data.rb', line 27

scope :unmatched, -> { where(matched: false) }