Class: SuperAuth::ActiveRecord::Role

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Nested
Defined in:
lib/super_auth/active_record/role.rb

Instance Method Summary collapse

Methods included from Nested

included

Instance Method Details

#descendants_datasetObject



9
10
11
12
# File 'lib/super_auth/active_record/role.rb', line 9

def descendants_dataset
  sql = SuperAuth::Role.new(id: self.id, parent_id: self.parent_id).descendants_dataset.sql
  self.class.from(%Q[(#{sql}) as super_auth_roles])
end