Class: Twenty::Project

Inherits:
Model
  • Object
show all
Includes:
ColorableMixin
Defined in:
lib/twenty-backend/model/project.rb

Constant Summary

Constants included from ColorableMixin

ColorableMixin::COLORS

Instance Method Summary collapse

Methods included from ColorableMixin

included, #random_color

Instance Method Details

#nameObject

Validations



9
# File 'lib/twenty-backend/model/project.rb', line 9

validates :name, presence: true

#pathString

Returns The path to a project.

Returns:

  • (String)

    The path to a project.



19
20
21
# File 'lib/twenty-backend/model/project.rb', line 19

def path
  super&.sub(Dir.home, "~")
end

#tasksObject

Associations



14
# File 'lib/twenty-backend/model/project.rb', line 14

has_many :tasks, class_name: "Twenty::Task"