Fix Connections servlet, set table name on models
This commit is contained in:
parent
ec2be8825e
commit
de2c2aeaea
3 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,6 @@
|
|||
class Twenty::Connection < Twenty::Model
|
||||
self.table_name = 'connections'
|
||||
|
||||
##
|
||||
# Validations
|
||||
validates :name, presence: true
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
class Twenty::Issue < Twenty::Model
|
||||
self.table_name = 'issues'
|
||||
|
||||
##
|
||||
# Validations
|
||||
validates :title, presence: true
|
||||
|
|
|
@ -7,6 +7,6 @@ class Twenty::Servlet::Connections < Twenty::Servlet
|
|||
private
|
||||
|
||||
def body
|
||||
JSON.dump database.connections.map { Ryo.table_of(_1,recursive: true) }
|
||||
JSON.dump(Twenty::Connection.all)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue