app/models/role.rb
#returns an array of locations that the role can signup at
returns an array of locations that the role can signup at
returns an array of locations that the role can signup at
def signup_locations
		locations = []
		self.department.loc_groups.each do |loc_group|
			locations << loc_group.locations if self.permissions.include?(loc_group.signup_permission)
		end
		return locations.flatten
	end
def signup_locations locations = [ ] self . department . loc_groups . each do | loc_group | locations << loc_group . locations if self . permissions . include? ( loc_group . signup_permission ) end return locations . flatten end
returns an array of locations that the role can signup at
returns an array of locations that the role can signup at