You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/models/issue.rb

13 lines
383 B

6 years ago
class Issue < ApplicationRecord
belongs_to :project
belongs_to :tracker
belongs_to :issue_tag, foreign_key: :priority_id
belongs_to :version, foreign_key: :fixed_version_id
belongs_to :user,optional: true
scope :issue_includes, ->{includes(:user)}
def get_assign_user
User.select(:login, :lastname,:firstname, :nickname)&.find_by_id(self.assigned_to_id)
end
6 years ago
end