Class: IpumsRegistration
- Inherits:
-
IpumsiActiveRecord::Base
- Object
- IpumsiActiveRecord::Base
- IpumsRegistration
- Defined in:
- app/models/ipums_registration.rb
Constant Summary collapse
- STATUS =
{approved: "approved", denied: "denied", pending: "pending", incomplete: "incomplete"}
Instance Attribute Summary collapse
-
#allow_emails ⇒ Object
Returns the value of attribute allow_emails.
-
#appropriate_citation ⇒ Object
Returns the value of attribute appropriate_citation.
-
#confidentiality ⇒ Object
Returns the value of attribute confidentiality.
-
#notify_errors ⇒ Object
Returns the value of attribute notify_errors.
-
#ownership ⇒ Object
Returns the value of attribute ownership.
-
#restriction ⇒ Object
Returns the value of attribute restriction.
-
#security ⇒ Object
Returns the value of attribute security.
-
#use ⇒ Object
Returns the value of attribute use.
-
#violations ⇒ Object
Returns the value of attribute violations.
Instance Method Summary collapse
Instance Attribute Details
#allow_emails ⇒ Object
Returns the value of attribute allow_emails.
7 8 9 |
# File 'app/models/ipums_registration.rb', line 7 def allow_emails @allow_emails end |
#appropriate_citation ⇒ Object
Returns the value of attribute appropriate_citation.
7 8 9 |
# File 'app/models/ipums_registration.rb', line 7 def appropriate_citation @appropriate_citation end |
#confidentiality ⇒ Object
Returns the value of attribute confidentiality.
7 8 9 |
# File 'app/models/ipums_registration.rb', line 7 def confidentiality @confidentiality end |
#notify_errors ⇒ Object
Returns the value of attribute notify_errors.
7 8 9 |
# File 'app/models/ipums_registration.rb', line 7 def notify_errors @notify_errors end |
#ownership ⇒ Object
Returns the value of attribute ownership.
7 8 9 |
# File 'app/models/ipums_registration.rb', line 7 def ownership @ownership end |
#restriction ⇒ Object
Returns the value of attribute restriction.
7 8 9 |
# File 'app/models/ipums_registration.rb', line 7 def restriction @restriction end |
#security ⇒ Object
Returns the value of attribute security.
7 8 9 |
# File 'app/models/ipums_registration.rb', line 7 def security @security end |
#use ⇒ Object
Returns the value of attribute use.
7 8 9 |
# File 'app/models/ipums_registration.rb', line 7 def use @use end |
#violations ⇒ Object
Returns the value of attribute violations.
7 8 9 |
# File 'app/models/ipums_registration.rb', line 7 def violations @violations end |
Instance Method Details
#is_expired? ⇒ Boolean
42 43 44 |
# File 'app/models/ipums_registration.rb', line 42 def is_expired? expires_at.nil? || DateTime.now > expires_at end |
#set_as_renewed ⇒ Object
35 36 37 38 39 |
# File 'app/models/ipums_registration.rb', line 35 def set_as_renewed now = DateTime.now self.expires_at = now + 1.year - 1.day self.last_renewed_at = now end |