Class: Athar::TableEvent
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Athar::TableEvent
- Includes:
- ActorLookup
- Defined in:
- lib/athar/table_event.rb
Constant Summary collapse
- EVENT_TYPE_TRUNCATE =
"truncate"
Class Method Summary collapse
Methods included from ActorLookup
Class Method Details
.for_table(table_name) ⇒ Object
18 19 20 |
# File 'lib/athar/table_event.rb', line 18 def for_table(table_name) where(table_name: table_name.to_s) end |
.recent ⇒ Object
14 15 16 |
# File 'lib/athar/table_event.rb', line 14 def recent order(occurred_at: :desc, id: :desc) end |
.truncate ⇒ Object
22 23 24 |
# File 'lib/athar/table_event.rb', line 22 def truncate where(event_type: EVENT_TYPE_TRUNCATE) end |