about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorAsh Furrow <ash@ashfurrow.com>2017-04-23 04:43:42 +0200
committerEugen <eugen@zeonfederated.com>2017-04-23 04:43:42 +0200
commit723f25a9999251b0c3f45c57aa88afa83f315b2d (patch)
tree9b25ee6b6dd7519a95302bbab57149b3263e083d /app/models
parent59b1de0bcf39473106e5380c129d7436be1ad89a (diff)
Admin UI for confirming users (#2245)
* Shows confirmed status in list.

* Adds ability to confirm users in admin UI.

* Added new english translations.

* Addresses feedback from #2245.

* More feedback.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/user.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index cd1f816ca..48e7b8088 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -19,6 +19,10 @@ class User < ApplicationRecord
   scope :admins,    -> { where(admin: true) }
   scope :confirmed, -> { where.not(confirmed_at: nil) }
 
+  def confirmed?
+    confirmed_at.present?
+  end
+
   def send_devise_notification(notification, *args)
     devise_mailer.send(notification, self, *args).deliver_later
   end