Sha256: 5eeddf4d35413c34376a5af8f6d836c7115c1e82a6b34b40f6b08649f2e4a7de

Contents?: true

Size: 390 Bytes

Versions: 13

Compression:

Stored size: 390 Bytes

Contents

# frozen_string_literal: true

module Doorkeeper
  module Models
    module Ownership
      extend ActiveSupport::Concern

      included do
        belongs_to :owner, polymorphic: true, optional: true
        validates :owner, presence: true, if: :validate_owner?
      end

      def validate_owner?
        Doorkeeper.configuration.confirm_application_owner?
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
doorkeeper-5.1.2 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.2.6 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.1.1 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.2.5 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.2.4 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.2.3 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.2.2 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.2.1 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.2.0 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.2.0.rc3 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.2.0.rc2 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.2.0.rc1 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.1.0 lib/doorkeeper/models/concerns/ownership.rb