Class: Noah::Model

Inherits:
Ohm::Model
  • Object
show all
Defined in:
lib/noah/models.rb

Direct Known Subclasses

Application, Configuration, Ephemeral, Host, Link, Service, Tag, Token, Watcher

Class Method Summary collapse

Class Method Details

.inherited(model) ⇒ Object


8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/noah/models.rb', line 8

def self.inherited(model)

  model.send :include, Ohm::Timestamping
  model.send :include, Ohm::Typecast
  model.send :include, Ohm::Callbacks
  model.send :include, Ohm::ExtraValidations

  model.send :attribute, :metadata

  # removing this as it's simply redundant
  # model.after :save, :notify_via_redis_save
  model.after :create, :notify_via_redis_create
  model.after :update, :notify_via_redis_update
  model.before :delete, :stash_name
  model.after :delete, :notify_via_redis_delete
  model.send :include, ModelClassMethods
end