Class: SuperAuth::ActiveRecord::Role

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

Instance Method Summary collapse

Instance Method Details

#descendants_datasetObject



6
7
8
9
# File 'lib/super_auth/active_record/role.rb', line 6

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