Class: Locomotive::Activity

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document
Defined in:
app/models/locomotive/activity.rb

Instance Method Summary collapse

Instance Method Details

#actionObject


28
29
30
# File 'app/models/locomotive/activity.rb', line 28

def action
  self.key.split('.').last
end

#domainObject

methods ##


24
25
26
# File 'app/models/locomotive/activity.rb', line 24

def domain
  self.key.split('.').first
end

#keyObject

validations ##


7
# File 'app/models/locomotive/activity.rb', line 7

field :key

#siteObject

associations ##


12
# File 'app/models/locomotive/activity.rb', line 12

belongs_to :site,       class_name: 'Locomotive::Site', validate: false, autosave: false