Sha256: d86b02e667a84a9ade76e6a32f556aceee6689b09c582d031a95d25b60d4357e
Contents?: true
Size: 832 Bytes
Versions: 6
Compression:
Stored size: 832 Bytes
Contents
unless ENV['AN_TEST_DB'] == 'mongodb' class Admin < ActiveRecord::Base belongs_to :user validates :user, presence: true acts_as_notification_target email_allowed: false, subscription_allowed: true, devise_resource: :user, printable_name: ->(admin) { "admin (#{admin.user.name})" } end else require 'mongoid' class Admin include Mongoid::Document include Mongoid::Timestamps include GlobalID::Identification belongs_to :user validates :user, presence: true field :phone_number, type: String field :slack_username, type: String include ActivityNotification::Models acts_as_notification_target email_allowed: false, subscription_allowed: true, devise_resource: :user, printable_name: ->(admin) { "admin (#{admin.user.name})" } end end
Version data entries
6 entries across 6 versions & 1 rubygems