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
|
||||
|
||||
def run_command(options)
|
||||
Twenty::Project.new(
|
||||
Twenty::Project.create(
|
||||
name: File.basename(Dir.getwd),
|
||||
path: Dir.getwd
|
||||
).save!
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -15,6 +15,9 @@ class Twenty::Command::Disconnect < Twenty::Command
|
|||
private
|
||||
|
||||
def run_command(options)
|
||||
warn "[twenty] disconnect..."
|
||||
Twenty::Project
|
||||
.where(path: Dir.getwd)
|
||||
.first!
|
||||
.destroy
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue