Class: Addressing

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

Overview

Rich join of Subject and Address

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#address_requiredObject

flag used in study_subject’s nested attributes for addressing to not reject if address fields are blank.



24
25
26
# File 'app/models/addressing.rb', line 24

def address_required
  @address_required
end

#current_userObject

Returns the value of attribute current_user.



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

def current_user
  @current_user
end

#subject_movedObject

Returns the value of attribute subject_moved.



59
60
61
# File 'app/models/addressing.rb', line 59

def subject_moved
  @subject_moved
end

Instance Method Details

#is_not_valid?Boolean

Returns boolean of comparison of is_valid == 2 or 999 Rails SHOULD convert incoming string params to integer.

Returns:

  • (Boolean)


75
76
77
78
# File 'app/models/addressing.rb', line 75

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