Sha256: 9c22e2a468f1582e3be9f3fea75057682dbe00d7febd2feee5656f8680260496
Contents?: true
Size: 656 Bytes
Versions: 8
Compression:
Stored size: 656 Bytes
Contents
module Landable module Traffic class PageView < ActiveRecord::Base include Landable::Traffic::TableName self.record_timestamps = false belongs_to :visit lookup_for :mime_type, class_name: MimeType lookup_for :http_method, class_name: HTTPMethod lookup_for :path, class_name: Path lookup_for :query_string, class_name: QueryString before_create :set_page_revision protected def set_page_revision page = Landable::Page.where(path: path).select(:published_revision_id).first self.page_revision_id = page.try(:published_revision_id) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems