Class: HomeExposureResponse

Inherits:
ActiveRecordShared show all
Defined in:
app/models/home_exposure_response.rb

Overview

Extraction of answers from the survey

Class Method Summary collapse

Class Method Details

.db_field_namesObject



20
21
22
# File 'app/models/home_exposure_response.rb', line 20

def self.db_field_names
	fields.collect{|f|f[:db]}
end

.fieldsObject



12
13
14
15
16
17
18
# File 'app/models/home_exposure_response.rb', line 12

def self.fields
	#	db: db field name
	#	human: humanized field
	@@fields ||= YAML::load( ERB.new( IO.read(
		File.join(File.dirname(__FILE__),'../../config/home_exposure_response_fields.yml')
		)).result)
end