From 218548c3b4bbf6cfb816901bad45c580f1452a32 Mon Sep 17 00:00:00 2001 From: yafeilee Date: Wed, 27 Apr 2016 14:47:04 +0800 Subject: [PATCH] Subscribe button text --- app/models/comment.rb | 2 +- app/views/subscribes/new.html.slim | 2 +- app/views/unsubscribes/new.html.slim | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/comment.rb b/app/models/comment.rb index 49be5e4..9925666 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -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 diff --git a/app/views/subscribes/new.html.slim b/app/views/subscribes/new.html.slim index c49cf85..f75c141 100644 --- a/app/views/subscribes/new.html.slim +++ b/app/views/subscribes/new.html.slim @@ -4,4 +4,4 @@ = simple_form_for @subscribe do |f| = f.input :email - = f.button :submit + = f.button :submit, value: '订阅', data: { 'disable-with'=> '订阅中...' } diff --git a/app/views/unsubscribes/new.html.slim b/app/views/unsubscribes/new.html.slim index 5306e74..3c94e6a 100644 --- a/app/views/unsubscribes/new.html.slim +++ b/app/views/unsubscribes/new.html.slim @@ -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'=> '退订中...' }