spec/rails_app/app/models/admin.rb in activity_notification-1.5.1 vs spec/rails_app/app/models/admin.rb in activity_notification-1.6.0

- old
+ new

@@ -4,10 +4,11 @@ validates :user, presence: true acts_as_notification_target email_allowed: false, subscription_allowed: true, devise_resource: :user, + current_devise_target: ->(current_user) { current_user.admin }, printable_name: ->(admin) { "admin (#{admin.user.name})" } end else require 'mongoid' class Admin @@ -23,8 +24,9 @@ include ActivityNotification::Models acts_as_notification_target email_allowed: false, subscription_allowed: true, devise_resource: :user, + current_devise_target: ->(current_user) { current_user.admin }, printable_name: ->(admin) { "admin (#{admin.user.name})" } end end