Sha256: 99d593a4ff36439f840caf2949a84254de0245715f6e8471a0dd65dec22f9af9
Contents?: true
Size: 395 Bytes
Versions: 1
Compression:
Stored size: 395 Bytes
Contents
class Monologue::User < ActiveRecord::Base has_many :posts attr_accessible :name, :email, :password, :password_confirmation has_secure_password validates_presence_of :password, on: :create validates_presence_of :name validates :email , presence: true, uniqueness: true def can_delete?(user) return false if self==user return false if user.posts.any? true end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
monologue-0.3.0 | app/models/monologue/user.rb |