mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 19:53:05 +08:00
13 lines
349 B
Ruby
13 lines
349 B
Ruby
module Gitea
|
|
class Database < ActiveRecord::Base
|
|
self.abstract_class = true
|
|
|
|
def self.set_connection
|
|
gitea_server_config = Rails.configuration.database_configuration[Rails.env]["gitea_server"]
|
|
raise 'gitea database config missing' if gitea_server_config.blank?
|
|
|
|
establish_connection gitea_server_config
|
|
end
|
|
end
|
|
end
|