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

Version Path
puffer-0.1.1 spec/dummy/app/models/user.rb
puffer-0.1.0 spec/dummy/app/models/user.rb
puffer-0.0.32 spec/dummy/app/models/user.rb
puffer-0.0.31 spec/dummy/app/models/user.rb
puffer-0.0.30 spec/dummy/app/models/user.rb
puffer-0.0.29 spec/dummy/app/models/user.rb
puffer-0.0.28 spec/dummy/app/models/user.rb
puffer-0.0.26 spec/dummy/app/models/user.rb
puffer-0.0.25 spec/dummy/app/models/user.rb
puffer-0.0.24 spec/dummy/app/models/user.rb
puffer-0.0.23 spec/dummy/app/models/user.rb
puffer-0.0.22 spec/dummy/app/models/user.rb
puffer-0.0.21 spec/dummy/app/models/user.rb
puffer-0.0.20 spec/dummy/app/models/user.rb
puffer-0.0.19 spec/dummy/app/models/user.rb
puffer-0.0.18 spec/dummy/app/models/user.rb
puffer-0.0.17 spec/dummy/app/models/user.rb
puffer-0.0.16 spec/dummy/app/models/user.rb
puffer-0.0.15 spec/dummy/app/models/user.rb
puffer-0.0.14 spec/dummy/app/models/user.rb