class Group
Constants
- ATTACHMENT_TYPES
TODO: change this to 'Governing Documents' and fix all the current attachments with the type of 'Governing Document'
- CATEGORIES
Public Instance Methods
aliases_string()
click to toggle source
# File lib/buweb/group.rb, line 72 def aliases_string self.aliases.join('| ') if aliases.present? end
aliases_string=(string)
click to toggle source
TODO: Adam wants this changed to be in the controllers
# File lib/buweb/group.rb, line 77 def aliases_string=(string) self.aliases = string.to_s.split('|').map(&:strip) end
as_indexed_json(*)
click to toggle source
# File lib/buweb/group.rb, line 81 def as_indexed_json(*) { slug: slug, title: title, description: description, email: email, phone: full_biola_phone_number, aliases: aliases, fax: fax, categories: categories, normalized_data: { title: title, subtitles: [], short_description: short_description, location: nil, image_url: nil, phone: full_biola_phone_number, alternate_phone: nil, published: published, email: email }, is_public: is_public? # if this was false it would be hidden from unauthenticated users. } end
dependent_indexes()
click to toggle source
# File lib/buweb/group.rb, line 113 def dependent_indexes [:events] end
dont_index?()
click to toggle source
# File lib/buweb/group.rb, line 117 def dont_index? !published end
is_public?()
click to toggle source
# File lib/buweb/group.rb, line 121 def is_public? true end
people()
click to toggle source
# File lib/buweb/group.rb, line 68 def people memberships.map(&:person) end
set_slug()
click to toggle source
sets slug from title
# File lib/buweb/group.rb, line 126 def set_slug self.slug = title.parameterize if title? end