Class: Gitrob::Models::Owner

Inherits:
Sequel::Model
  • Object
show all
Defined in:
lib/gitrob/models/owner.rb

Constant Summary collapse

ALLOWED_TYPES =
%w(User Organization)

Instance Method Summary collapse

Instance Method Details

#validateObject



15
16
17
18
19
20
# File 'lib/gitrob/models/owner.rb', line 15

def validate
  super
  validates_presence [:github_id, :login, :type, :url,
                      :html_url, :avatar_url]
  validates_includes ALLOWED_TYPES, :type
end