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"
|
elsif t == "honor_type"
|
||||||
pd_data << {"data_title" => (p.honor_type.title rescue "")}
|
pd_data << {"data_title" => (p.honor_type.title rescue "")}
|
||||||
elsif t == "award_date"
|
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
|
else
|
||||||
pd_data << { "data_title" => p.send(t) }
|
pd_data << { "data_title" => p.send(t) }
|
||||||
end
|
end
|
||||||
|
@ -106,6 +106,8 @@ class Honor
|
||||||
value = I18n.t(self.language) rescue ""
|
value = I18n.t(self.language) rescue ""
|
||||||
when "honor_type"
|
when "honor_type"
|
||||||
value = self.honor_type.title rescue ""
|
value = self.honor_type.title rescue ""
|
||||||
|
when "award_date"
|
||||||
|
value = self.award_date.strftime("%Y/%m/%d") rescue ""
|
||||||
else
|
else
|
||||||
value = self.send(field) rescue ""
|
value = self.send(field) rescue ""
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue