Sha256: fabc729960b419062f62bdcbf085361e8f47938dc23ab3b66bea2b6045b6b14b

Contents?: true

Size: 396 Bytes

Versions: 1

Compression:

Stored size: 396 Bytes

Contents

module Doorkeeper
  module Models
    module Ownership
      def validate_owner?
        Doorkeeper.configuration.confirm_application_owner?
      end    
  
      def self.included(base)
        base.class_eval do
          belongs_to :owner, :polymorphic => true
          validates :owner, :presence => true, :if => :validate_owner?      
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
couchkeeper-0.6.7 lib/doorkeeper/models/ownership.rb