Sha256: b4014bf2777127411ef4a4324115b01c2e6e8ff438c9a5e35b8a8d28d9a8bdbb
Contents?: true
Size: 405 Bytes
Versions: 1
Compression:
Stored size: 405 Bytes
Contents
# frozen_string_literal: true class Issue < ApplicationRecord extend Enumerize belongs_to :project belongs_to :creator, class_name: 'User' belongs_to :assignee, class_name: 'User', required: false has_many :comments, class_name: 'IssueComment' validates :title, presence: true STATUS_MAP = { draft: 0, opened: 1, closed: 2, }.freeze enumerize :status, in: STATUS_MAP end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
model_base_generators-0.4.0 | examples/rails-5.0/app/models/issue.rb |