class TheCity::Account

The City church account

@!attribute [r] name

@return [String] The name of the church, 'Grace Church'.

@!attribute [r] subdomain

@return [String] The subdomain used to access this account, subdomain.onthecity.org

@!attribute [r] id

@return [Integer] The id associated with the church account

Attributes

id[R]
name[R]
subdomain[R]

Public Class Methods

new(attrs={}, options={}) click to toggle source
Calls superclass method TheCity::Base::new
# File lib/the_city/account.rb, line 15
def initialize(attrs={}, options={})
  super(attrs,options)
  @campuses = Array(attrs.delete(:campuses)).map {|g| TheCity::Group.new(g,options)}
end

Public Instance Methods

campuses() click to toggle source

Return campuses that belong to a multisite church

@return [Array<TheCity::Group>]

# File lib/the_city/account.rb, line 23
def campuses
  @campuses
end
label_for(thecity_primitive) click to toggle source
# File lib/the_city/account.rb, line 27
def label_for(thecity_primitive)
  terminology.send(thecity_primitive.downcase.to_sym) rescue nil
end