Class: Assignment

Inherits:
ApplicationRecord show all
Defined in:
app/models/assignment.rb

Overview

Schema Information

Table name: assignments

id          :integer          not null, primary key
user_id     :integer          not null
created_at  :datetime
updated_at  :datetime
resource_id :integer          not null

Indexes

index_assignments_on_resource_id_and_user_id  (resource_id,user_id) UNIQUE

Instance Method Summary collapse

Instance Method Details

#to_sString

Returns human-friendly representation of this Assignment

Returns:

  • (String)

    human-friendly representation of this Assignment



28
29
30
# File 'app/models/assignment.rb', line 28

def to_s
  "#{user} assigned to #{resource}"
end