Merge pull request #36 from exstake/add-stake-order-creation-notification

add stake order notification on create
This commit is contained in:
João Geonizeli
2021-08-21 10:06:14 -03:00
committed by GitHub

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