Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gryphon committed Feb 27, 2024
1 parent b907c9a commit 11fd592
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/custom_table/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def field_value_for item, field, definitions: nil, variant: nil
elsif item.class.columns_hash[field.to_s] && item.class.columns_hash[field.to_s].type == :boolean
return boolean_icon(item.send(field)) rescue ""
elsif item.class.defined_enums.has_key?(field.to_s)
return (item.send(field).presence || not_set).to_s rescue ""
return (item.send("human_#{field}") rescue (item.send(field).presence || not_set)).to_s rescue ""
elsif item.class.columns_hash[field.to_s] && [:date, :datetime].include?(item.class.columns_hash[field.to_s].type)
return (item.send(field).blank? ? not_set : l(item.send(field), format: :short)) rescue ""
elsif item.class.columns_hash[field.to_s] && [:integer, :float, :decimal].include?(item.class.columns_hash[field.to_s].type)
Expand Down

0 comments on commit 11fd592

Please sign in to comment.