Module: DiasporaFederation::Validators::RelayableValidator

Included in:
CommentValidator, EventParticipationValidator, LikeValidator, PollParticipationValidator
Defined in:
lib/diaspora_federation/validators/relayable_validator.rb

Overview

This is included to validatros which validate entities which include Entities::Relayable.

Class Method Summary collapse

Class Method Details

.included(validator) ⇒ Object

When this module is included in a Validator child it adds rules for relayable validation.


7
8
9
10
11
12
13
14
# File 'lib/diaspora_federation/validators/relayable_validator.rb', line 7

def self.included(validator)
  validator.class_eval do
    rule :author, :diaspora_id
    rule :guid, :guid
    rule :parent_guid, :guid
    rule :parent, :not_nil
  end
end