cartodb-4.42/config/initializers/02_extensions.rb

11 lines
346 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +08:00
# Disable XML parameter parsing, see:
# http://www.insinuator.net/2013/01/rails-yaml/
ActionDispatch::ParamsParser::DEFAULT_PARSERS.delete(Mime::XML)
# Adds an extension method previously found in a Vizzuality fork of rails-sequel
module SequelRails
def self.connection
@db ||= ::Sequel.synchronize { ::Sequel::DATABASES.first }
end
end