Fix 'twenty connect|disconnect'
This commit is contained in:
parent
85d0280b8c
commit
68e25ac8c7
2 changed files with 6 additions and 3 deletions
|
@ -15,9 +15,9 @@ class Twenty::Command::Connect < Twenty::Command
|
||||||
private
|
private
|
||||||
|
|
||||||
def run_command(options)
|
def run_command(options)
|
||||||
Twenty::Project.new(
|
Twenty::Project.create(
|
||||||
name: File.basename(Dir.getwd),
|
name: File.basename(Dir.getwd),
|
||||||
path: Dir.getwd
|
path: Dir.getwd
|
||||||
).save!
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,6 +15,9 @@ class Twenty::Command::Disconnect < Twenty::Command
|
||||||
private
|
private
|
||||||
|
|
||||||
def run_command(options)
|
def run_command(options)
|
||||||
warn "[twenty] disconnect..."
|
Twenty::Project
|
||||||
|
.where(path: Dir.getwd)
|
||||||
|
.first!
|
||||||
|
.destroy
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue