Sha256: eddedbc54098d306406771b58dde1c2d740da04fb5d6d5fc5bbcbae8ec3f3b20

Contents?: true

Size: 383 Bytes

Versions: 30

Compression:

Stored size: 383 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.config.confirm_application_owner?
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
doorkeeper-5.8.1 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.8.0 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.7.1 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.7.0 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.6.9 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.6.8 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.6.7 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.6.6 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.6.5 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.6.4 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.6.3 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.6.2 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.6.1 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.6.0 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.6.0.rc2 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.6.0.rc1 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.5.4 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.5.3 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.5.2 lib/doorkeeper/models/concerns/ownership.rb
doorkeeper-5.5.1 lib/doorkeeper/models/concerns/ownership.rb