Sha256: 18d38c765f9f4819966ad05a79e257256e7a8fcc2149186968a61e3bea44a960

Contents?: true

Size: 461 Bytes

Versions: 4

Compression:

Stored size: 461 Bytes

Contents

class User < ActiveRecord::Base
  devise :database_authenticatable, :registerable, :confirmable
  validates :email, presence: true
  has_many :articles, dependent: :destroy
  has_one :admin, dependent: :destroy

  acts_as_target email: :email, email_allowed: :confirmed_at, batch_email_allowed: :confirmed_at,
                 subscription_allowed: true, printable_name: :name
  acts_as_notifier printable_name: :name

  def admin?
    admin.present?
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activity_notification-1.3.0 spec/rails_app/app/models/user.rb
activity_notification-1.2.1 spec/rails_app/app/models/user.rb
activity_notification-1.2.0 spec/rails_app/app/models/user.rb
activity_notification-1.1.0 spec/rails_app/app/models/user.rb