forked from saurabh/personal-honor
award date fixed and date format
This commit is contained in:
parent
e39650abca
commit
8bcab846c4
|
@ -80,7 +80,7 @@ class Honor
|
|||
elsif t == "honor_type"
|
||||
pd_data << {"data_title" => (p.honor_type.title rescue "")}
|
||||
elsif t == "award_date"
|
||||
pd_data << {"value" => (p.send(fs).strftime("%Y/%m/%d") rescue "")}
|
||||
pd_data << {"data_title" => (p.send(fs).strftime("%Y/%m/%d") rescue "")}
|
||||
else
|
||||
pd_data << { "data_title" => p.send(t) }
|
||||
end
|
||||
|
@ -106,6 +106,8 @@ class Honor
|
|||
value = I18n.t(self.language) rescue ""
|
||||
when "honor_type"
|
||||
value = self.honor_type.title rescue ""
|
||||
when "award_date"
|
||||
value = self.award_date.strftime("%Y/%m/%d") rescue ""
|
||||
else
|
||||
value = self.send(field) rescue ""
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue