Sha256: db58a7c6aad2ae5698b2fe811180a9b954105442e33187e3f3373fde5d68b2a8
Contents?: true
Size: 391 Bytes
Versions: 28
Compression:
Stored size: 391 Bytes
Contents
class User < ActiveRecord::Base has_one :profile has_many :posts has_many :friendships has_many :friendship_requests, :source => :friend, :through => :friendships, :conditions => {:state => 'requested'} has_many :friends, :through => :friendships, :conditions => {:state => 'accepted'} validates_presence_of :email, :password validates_length_of :password, :minimum => 6 end
Version data entries
28 entries across 28 versions & 1 rubygems