Sha256: ba48f576e01de092085e1d1275d18264e8d8cf9f7f32bdcbe86a2df7359ce421

Contents?: true

Size: 381 Bytes

Versions: 20

Compression:

Stored size: 381 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

20 entries across 20 versions & 1 rubygems

Version Path
doorkeeper-1.1.0 lib/doorkeeper/models/ownership.rb
doorkeeper-1.0.0 lib/doorkeeper/models/ownership.rb
doorkeeper-1.0.0.rc2 lib/doorkeeper/models/ownership.rb
doorkeeper-1.0.0.rc1 lib/doorkeeper/models/ownership.rb
doorkeeper-0.7.4 lib/doorkeeper/models/ownership.rb
doorkeeper-0.7.3 lib/doorkeeper/models/ownership.rb
doorkeeper-0.7.2 lib/doorkeeper/models/ownership.rb
doorkeeper-0.7.1 lib/doorkeeper/models/ownership.rb
doorkeeper-0.7.0 lib/doorkeeper/models/ownership.rb
doorkeeper-0.6.7 lib/doorkeeper/models/ownership.rb
doorkeeper-0.6.6 lib/doorkeeper/models/ownership.rb
doorkeeper-0.6.5 lib/doorkeeper/models/ownership.rb
doorkeeper-0.6.4 lib/doorkeeper/models/ownership.rb
doorkeeper-0.6.3 lib/doorkeeper/models/ownership.rb
doorkeeper-0.6.2 lib/doorkeeper/models/ownership.rb
doorkeeper-0.6.1 lib/doorkeeper/models/ownership.rb
doorkeeper-0.6.0 lib/doorkeeper/models/ownership.rb
doorkeeper-0.6.0.rc1 lib/doorkeeper/models/ownership.rb
doorkeeper-0.5.0 lib/doorkeeper/models/ownership.rb
doorkeeper-0.5.0.rc1 lib/doorkeeper/models/ownership.rb