Sha256: cd4d6ef9a51db33231b819cce5344c0aea0f23fc73cc9a5fb3657485fd0f78dc

Contents?: true

Size: 345 Bytes

Versions: 17

Compression:

Stored size: 345 Bytes

Contents

class User < ActiveRecord::Base
  has_one :note
  has_many :tasks
  has_many :projects
  has_many :locations
    
  validates_length_of :login, :maximum => 10
  
  def full_name
    "#{first_name} #{last_name}"
  end
  
  def has_nothing_to_do
    tasks.all? {|task| task.completed}
  end
  
  def email_host
    email.split('@').last
  end
end

Version data entries

17 entries across 17 versions & 6 rubygems

Version Path
captproton-restfulx-1.2.3 test/rails/models/user.rb
dima-restfulx-1.2.0 test/rails/models/user.rb
dima-restfulx-1.2.1 test/rails/models/user.rb
dima-restfulx-1.2.2 test/rails/models/user.rb
dima-restfulx-1.2.3 test/rails/models/user.rb
dima-restfulx-1.2.4 test/rails/models/user.rb
dima-ruboss4ruby-1.1.2 test/rails/models/user.rb
rlmattax-restfulx-1.2.4.1 test/rails/models/user.rb
restfulx-1.3.1 test/rails/models/user.rb
restfulx-1.3.0 test/rails/models/user.rb
restfulx-1.2.5 test/rails/models/user.rb
restfulx-1.2.3 test/rails/models/user.rb
restfulx-1.2.4 test/rails/models/user.rb
restfulx-1.2.0 test/rails/models/user.rb
restfulx-1.2.1 test/rails/models/user.rb
restfulx-1.2.2 test/rails/models/user.rb
ruboss4ruby-1.1.2 test/rails/models/user.rb