1
0
This repository has been archived on 2023-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
2020-07-02 18:59:55 +02:00

11 lines
262 B
Ruby

class Goal < ActiveRecord::Base
belongs_to :project, required: true
has_many :targets, inverse_of: :goal, dependent: :destroy
validates :name, presence: true, uniqueness: {scope: :project_id}
def is_binding?
self == project.goals.binding
end
end