Class: IcfMasterId

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_unusedObject

a named scope would be nice but



24
25
26
27
28
# File 'app/models/icf_master_id.rb', line 24

def self.next_unused
	find(:first,
		:conditions => ['study_subject_id IS NULL']
	)
end

Instance Method Details

#to_sObject

probably shouldn’t add validations as this won’t be created by users. yet.



19
20
21
# File 'app/models/icf_master_id.rb', line 19

def to_s
	icf_master_id
end