mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Poll showing, dequeueing, tests
This commit is contained in:
parent
6888cd15a4
commit
3bc7385caf
9 changed files with 216 additions and 9 deletions
|
@ -4,4 +4,9 @@ class Message < ActiveRecord::Base
|
|||
before_create -> { self.queued = true }
|
||||
|
||||
scope :queued, -> { where(queued: true) }
|
||||
|
||||
def dequeue
|
||||
self.queued = false
|
||||
save
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue