Merge pull request #36 from exstake/add-stake-order-creation-notification
add stake order notification on create
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user