Module: PgTrigger::Model::ClassMethods

Defined in:
lib/pg_trigger/model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#_triggersObject (readonly)

Returns the value of attribute _triggers.



11
12
13
# File 'lib/pg_trigger/model.rb', line 11

def _triggers
  @_triggers
end

Instance Method Details

#triggerObject



13
14
15
16
17
18
19
20
# File 'lib/pg_trigger/model.rb', line 13

def trigger
  tr = PgTrigger::Trigger.new
  tr.on(table_name)

  @_triggers ||= []
  @_triggers << tr
  tr
end