a TON of bugfixes and new features

This commit is contained in:
jomo
2014-04-28 03:01:33 +02:00
parent a6ba503e73
commit 65f5adf65d
59 changed files with 1023 additions and 970 deletions

View File

@@ -15,8 +15,14 @@ class Role < ActiveRecord::Base
!!(Role.find_by_name(name) == self)
end
def self.get (name)
Role.find_by_name(name)
def self.get (input)
if input.is_a?(String) || input.is_a?(Symbol)
Role.find_by_name(input)
elsif input.is_a?(Fixnum)
Role.find_by_id(input)
elsif input.is_a?(Role)
return input
end
end
def <=> (role)