Class: ProfileFieldTypes::Date

Inherits:
ProfileField show all
Defined in:
app/models/profile_field_types/date.rb

Overview

Date Field

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ProfileField

#children_count, #delete_cache, #display_html, #key, #label, #orig_profileable, possible_types, #profileable, #underscored_type

Methods inherited from ActiveRecord::Base

#readonly?

Class Method Details

.model_nameObject



6
# File 'app/models/profile_field_types/date.rb', line 6

def self.model_name; ProfileField.model_name; end

Instance Method Details

#valueObject



8
9
10
11
# File 'app/models/profile_field_types/date.rb', line 8

def value
  date_string = super
  I18n.localize(date_string.to_date) if date_string.present?
end