Subscribe button text
This commit is contained in:
parent
0f83d3b127
commit
218548c3b4
|
@ -11,7 +11,7 @@ class Comment < ApplicationRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
after_commit on: :create do
|
after_commit on: :create do
|
||||||
if ENV['MAIL_SERVER'].present? && ENV['ADMIN_USER'].present? && ENV['ADMIN_USER'] =~ /@/
|
if ENV['MAIL_SERVER'].present? && ENV['ADMIN_USER'].present? && ENV['ADMIN_USER'] =~ /@/ && ENV['ADMIN_USER'] != self.email
|
||||||
Rails.logger.info 'comment created, comment worker start'
|
Rails.logger.info 'comment created, comment worker start'
|
||||||
NewCommentWorker.perform_async(self.id.to_s, ENV['ADMIN_USER'])
|
NewCommentWorker.perform_async(self.id.to_s, ENV['ADMIN_USER'])
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
|
|
||||||
= simple_form_for @subscribe do |f|
|
= simple_form_for @subscribe do |f|
|
||||||
= f.input :email
|
= f.input :email
|
||||||
= f.button :submit
|
= f.button :submit, value: '订阅', data: { 'disable-with'=> '订阅中...' }
|
||||||
|
|
|
@ -6,4 +6,4 @@
|
||||||
.row
|
.row
|
||||||
.small-12.large-6.columns
|
.small-12.large-6.columns
|
||||||
= f.input :email, placeholder: 'your@email.com'
|
= f.input :email, placeholder: 'your@email.com'
|
||||||
= f.submit
|
= f.button :submit, value: '退订', data: { 'disable-with'=> '退订中...' }
|
||||||
|
|
Loading…
Reference in New Issue