Class: Shamu::Events::ActiveRecord::Message
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Shamu::Events::ActiveRecord::Message
- Defined in:
- lib/shamu/events/active_record/message.rb
Overview
The model used to store the event messages in the database.
Scope collapse
-
#by_channel ⇒ ActiveRecord::Relation
Messages posted to the given channel.
-
#since ⇒ ActiveRecord::Relation
Messages posted after the given created_at.
Instance Attribute Details
#by_channel ⇒ ActiveRecord::Relation
Returns messages posted to the given channel.
36 37 38 |
# File 'lib/shamu/events/active_record/message.rb', line 36 scope :by_channel, ->( name ) { where( channel: name ) } |
#since ⇒ ActiveRecord::Relation
Returns messages posted after the given created_at.
42 43 44 |
# File 'lib/shamu/events/active_record/message.rb', line 42 scope :since, ->( created_at ) { where( arel_table[:created_at].gt( created_at ) ) } |