Module: Doorkeeper::Models::Ownership
- Defined in:
- lib/doorkeeper/models/ownership.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/doorkeeper/models/ownership.rb', line 8 def self.included(base) base.class_eval do belongs_to :owner, :polymorphic => true validates :owner, :presence => true, :if => :validate_owner? end end |
Instance Method Details
#validate_owner? ⇒ Boolean
4 5 6 |
# File 'lib/doorkeeper/models/ownership.rb', line 4 def validate_owner? Doorkeeper.configuration.confirm_application_owner? end |