about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2017-05-30 22:28:56 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-30 15:28:56 +0200
commit7db98aa70e44c922bd13d72e78e0ae94826ad29f (patch)
tree14606eb0440666dd7eea50288ceface904848949 /app/models
parente031fd60ad9ee492fbbda319eaeb213098898d03 (diff)
Refactor User and spec (#3431)
* Protect send_devise_notification of User

* Improve spec for User
Diffstat (limited to 'app/models')
-rw-r--r--app/models/user.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index f367d74aa..8840de82d 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -68,10 +68,6 @@ class User < ApplicationRecord
     save!
   end
 
-  def send_devise_notification(notification, *args)
-    devise_mailer.send(notification, self, *args).deliver_later
-  end
-
   def setting_default_privacy
     settings.default_privacy || (account.locked? ? 'private' : 'public')
   end
@@ -88,6 +84,12 @@ class User < ApplicationRecord
     settings.auto_play_gif
   end
 
+  protected
+
+  def send_devise_notification(notification, *args)
+    devise_mailer.send(notification, self, *args).deliver_later
+  end
+
   private
 
   def sanitize_languages