Class: Community
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Community
- Defined in:
- lib/dspace/active_record/community.rb
Class Method Summary collapse
Class Method Details
.find_all_sub_communities ⇒ Object
30 31 32 |
# File 'lib/dspace/active_record/community.rb', line 30 def self.find_all_sub_communities Community.find_by_sql("SELECT community.* FROM community WHERE community_id IN (SELECT child_comm_id FROM community2community)") end |
.find_all_top_level ⇒ Object
26 27 28 |
# File 'lib/dspace/active_record/community.rb', line 26 def self.find_all_top_level Community.find_by_sql("SELECT community.* FROM community WHERE community_id NOT IN (SELECT child_comm_id FROM community2community)") end |