Class: PhoneNumber

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

Overview

A study_subject’s phone number

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#current_userObject

Returns the value of attribute current_user.



66
67
68
# File 'app/models/phone_number.rb', line 66

def current_user
  @current_user
end

Instance Method Details

#is_not_valid?Boolean

Returns boolean of comparison true only if is_valid == 2 or 999 Beware of strings from forms Rails SHOULD convert incoming string params to integer.

Returns:

  • (Boolean)


77
78
79
80
# File 'app/models/phone_number.rb', line 77

def is_not_valid?
#		[2,999].include?(is_valid.to_i)
	[2,999].include?(is_valid)
end

#to_sObject

Returns description



69
70
71
# File 'app/models/phone_number.rb', line 69

def to_s
	phone_number
end