Sha256: c496ab88dced4c73413e7ae26bb41795ba85ab4b4cb61fff7c7351d1d95c6594
Contents?: true
Size: 1.13 KB
Versions: 3
Compression:
Stored size: 1.13 KB
Contents
# frozen_string_literal: true require "doorkeeper/orm/sequel/stale_records_cleaner" module Doorkeeper module Orm module Sequel def self.initialize_models! # Hack to bypass Sequel restrictions to model datasets definition. # As it requires valid existing table at the moment of Model class definition, # all the rake tasks (db:create, db:migrate, etc) would be aborted due to error. old_value = ::Sequel::Model.require_valid_table ::Sequel::Model.require_valid_table = false ::Sequel::Model.strict_param_setting = false ::Sequel::Model.plugin :json_serializer ::Sequel::Model.plugin :polymorphic begin require "doorkeeper/orm/sequel/access_grant" require "doorkeeper/orm/sequel/access_token" require "doorkeeper/orm/sequel/application" ensure ::Sequel::Model.require_valid_table = old_value end end def self.initialize_application_owner! require "doorkeeper-sequel/mixins/concerns/ownership" Doorkeeper::Application.send :include, DoorkeeperSequel::Ownership end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
doorkeeper-sequel-2.4.0 | lib/doorkeeper/orm/sequel.rb |
doorkeeper-sequel-2.3.0 | lib/doorkeeper/orm/sequel.rb |
doorkeeper-sequel-2.2.0 | lib/doorkeeper/orm/sequel.rb |