Add Twenty::Project#path_exist?
This commit is contained in:
parent
07787710e5
commit
671c3d92e3
1 changed files with 7 additions and 0 deletions
|
@ -15,6 +15,13 @@ class Twenty::Project < Sequel::Model
|
|||
super&.sub(Dir.home, "~")
|
||||
end
|
||||
|
||||
##
|
||||
# @return [Boolean]
|
||||
# Returns true when {#path} exists on disk.
|
||||
def path_exist?
|
||||
File.exist? File.expand_path(path)
|
||||
end
|
||||
|
||||
##
|
||||
# @return [Integer]
|
||||
# Returns the number of open tasks a project has.
|
||||
|
|
Loading…
Reference in a new issue