Class: ProfileFieldTypes::Employment
Class Method Summary
collapse
Instance Method Summary
collapse
#children_count, #delete_cache, #display_html, #key, #orig_profileable, possible_types, #profileable, #underscored_type, #value
#readonly?
Class Method Details
.model_name ⇒ Object
4
|
# File 'app/models/profile_field_types/employment.rb', line 4
def self.model_name; ProfileField.model_name; end
|
Instance Method Details
#from ⇒ Object
14
15
16
|
# File 'app/models/profile_field_types/employment.rb', line 14
def from
get_field(:from).to_date if get_field(:from)
end
|
#label ⇒ Object
If the employment instance has no label, just say ‘Employment’.
10
11
12
|
# File 'app/models/profile_field_types/employment.rb', line 10
def label
super || I18n.translate( :employment, default: "Employment" )
end
|
#to ⇒ Object
18
19
20
|
# File 'app/models/profile_field_types/employment.rb', line 18
def to
get_field(:to).to_date if get_field(:to)
end
|