diff --git a/app/models/honor.rb b/app/models/honor.rb index dc91ad1..23bfc2a 100644 --- a/app/models/honor.rb +++ b/app/models/honor.rb @@ -72,11 +72,10 @@ class Honor fields_to_show = fields_to_show - fields_to_remove plugin_datas = datas.sort_for_frontend.collect.with_index do |p,index| - pd_data = [] fields_to_show.collect do |t| if t == "award_name" - pd_data << { "data_title" => "#{p.send(t)}" } + pd_data << { "data_title" => "#{p.send(t)}" } elsif t == "honor_type" pd_data << {"data_title" => (p.honor_type.title rescue "")} elsif t == "award_date" @@ -85,7 +84,6 @@ class Honor pd_data << { "data_title" => p.send(t) } end end - { "pd_datas" => pd_data, "type-sort" => (p.honor_type.sort_position.to_i rescue 1000),