Sha256: 320bcfb2c2fdc1f39b64e19fef3c6b0a238dbc9e83e1bcf73a1d8f92e2f7adbe

Contents?: true

Size: 630 Bytes

Versions: 24

Compression:

Stored size: 630 Bytes

Contents

# == Schema Information
#
# Table name: lentil_users
#
#  id           :integer          not null, primary key
#  user_name    :string(255)
#  full_name    :string(255)
#  banned       :boolean
#  created_at   :datetime         not null
#  updated_at   :datetime         not null
#  service_id   :integer
#  bio          :text
#  images_count :integer          default(0)
#

class Lentil::User < ActiveRecord::Base
  attr_accessible :banned, :full_name, :user_name, :bio

  has_many :images
  belongs_to :service

  validates_uniqueness_of :user_name, :scope => :service_id

  def number_of_images
    self.images.count
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
lentil-0.8.0 app/models/lentil/user.rb
lentil-0.7.1 app/models/lentil/user.rb
lentil-0.6.0 app/models/lentil/user.rb
lentil-0.5.2 app/models/lentil/user.rb
lentil-0.5.1 app/models/lentil/user.rb
lentil-0.5.0 app/models/lentil/user.rb
lentil-0.4.2 app/models/lentil/user.rb
lentil-0.4.0 app/models/lentil/user.rb
lentil-0.3.1 app/models/lentil/user.rb
lentil-0.3.0 app/models/lentil/user.rb
lentil-0.2.3 app/models/lentil/user.rb
lentil-0.2.2 app/models/lentil/user.rb
lentil-0.2.1 app/models/lentil/user.rb
lentil-0.2.0 app/models/lentil/user.rb
lentil-0.1.8 app/models/lentil/user.rb
lentil-0.1.7 app/models/lentil/user.rb
lentil-0.1.6 app/models/lentil/user.rb
lentil-0.1.3 app/models/lentil/user.rb
lentil-0.1.2 app/models/lentil/user.rb
lentil-0.1.1 app/models/lentil/user.rb