Sha256: 50405093ba60bbf7bc1c2dc5fd7b70f4faa84754d66e561007356e9c9d876d63

Contents?: true

Size: 400 Bytes

Versions: 1

Compression:

Stored size: 400 Bytes

Contents

class User < ActiveRecord::Base
  include Kublog::Notifiable
  include Kublog::Author
  
  has_secure_password
  validates_presence_of :email
  validates_presence_of :password
  
  def to_s
    name.titleize
  end
  
  def notify_post?(post)
    if post.for_shipper?
      return self.email == 'adrian@rutanet.com'
    else
      return true
    end
  end
  
  def admin?
    self.admin
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kublog-0.0.1.1 test/dummy/app/models/user.rb