Sha256: 2f0ec741fe8ff25f17128c415b5ff3fc27f43bfd1dd44a26f6117dc3bd981cd9

Contents?: true

Size: 662 Bytes

Versions: 1

Compression:

Stored size: 662 Bytes

Contents

# Extraction of answers from the survey
class HomeExposureResponse < ActiveRecordShared

	belongs_to :study_subject
	attr_protected :study_subject_id, :study_subject

	#	NEEDS to be here to match the uniqueness index in the database.
	validates_uniqueness_of :study_subject_id, :allow_nil => true

	validates_length_of :additional_comments, :maximum => 65000, :allow_blank => true

	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

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

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ccls-ccls_engine-3.11.0 app/models/home_exposure_response.rb