app/models/community.rb
# Don't get dizzy.  This is all of the collections this community has collected.  This is the same thing as
# "featured" collections or "endorsed" collections... that is the way it's done, now: you simply add the collection
# to the community's focus.
#
# NOTE that this returns the collection_item, NOT the collection it points to!  This is so you can get the
# annotation along with it.
Don't get dizzy.  This is all of the collections this community has collected.  This is the same thing as
"featured" collections or "endorsed" collections... that is the way it's done, now: you simply add the collection
to the community's focus.

NOTE that this returns the collection_item, NOT the collection it points to.  This is so you can get the
annotation along with it.
Don ' t get dizzy . This is all of the collections this community has collected . This is the same thing as " featured " collections or " endorsed " collections ... that is the way it ' s done now : you simply add the collection to the community ' s focus . NOTE that this returns the collection_item NOT the collection it points to . This is so you can get the annotation along with it .
def featured_collections
    return [] unless self.collections && !self.collections.blank?
    collections.collect do |c|
      c.collection_items.where("collected_item_type = 'Collection'")
    end.flatten.compact.uniq
  end
def featured_collections return [ ] unless self . collections && ! self . collections . blank? collections . collect do | c | c . collection_items . where ( "collected_item_type = 'Collection'" ) end . flatten . compact . uniq end
Don't get dizzy.
Don ' t get dizzy .