Subscribe button text

This commit is contained in:
yafeilee 2016-04-27 14:47:04 +08:00
parent 0f83d3b127
commit 218548c3b4
3 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ class Comment < ApplicationRecord
end
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'
NewCommentWorker.perform_async(self.id.to_s, ENV['ADMIN_USER'])
end

View File

@ -4,4 +4,4 @@
= simple_form_for @subscribe do |f|
= f.input :email
= f.button :submit
= f.button :submit, value: '订阅', data: { 'disable-with'=> '订阅中...' }

View File

@ -6,4 +6,4 @@
.row
.small-12.large-6.columns
= f.input :email, placeholder: 'your@email.com'
= f.submit
= f.button :submit, value: '退订', data: { 'disable-with'=> '退订中...' }