add stake order notification on create

This commit is contained in:
João Geonizeli
2021-08-21 10:04:41 -03:00
parent 2bba03dafd
commit 5834303a90

View File

@@ -25,10 +25,21 @@
# #
class StakeOrder < ApplicationRecord class StakeOrder < ApplicationRecord
include Processable include Processable
include Notifiable
belongs_to :user belongs_to :user
belongs_to :currency belongs_to :currency
validates :pool_name, presence: true validates :pool_name, presence: true
validates :amount, presence: true validates :amount, presence: true
private
def notification_message
"
💸 New stake order! 💸\n
user: #{user.email}
amount: #{amount}
"
end
end end