Class: Vanity::Adapters::ActiveRecordAdapter::VanityMetric

Inherits:
VanityRecord
  • Object
show all
Defined in:
lib/vanity/adapters/active_record_adapter.rb

Overview

Metric model

Class Method Summary collapse

Methods inherited from VanityRecord

define_schema

Class Method Details

.retrieve(metric) ⇒ Object



82
83
84
# File 'lib/vanity/adapters/active_record_adapter.rb', line 82

def self.retrieve(metric)
  find_or_create_by_metric_id(metric.to_s)
end