Skip to content

Commit

Permalink
Fix undefined method (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
deecay committed Dec 14, 2018
1 parent 39c1bd0 commit 0bef53e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/helpers/pivottables_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ def pv_caption(colname)
end
end

unless defined?(l_hours_short)
def l_hours_short(hours)
"%.2f" % hours.to_f
end
end

def parse_events(events)

result_list = Array.new
Expand Down Expand Up @@ -54,7 +60,7 @@ def parse_issues(issues)

strpformat = ""
if Setting.date_format == ""
strpformat = lu(User.current, "date.formats.default", :default => "%Y-%m-%d")
strpformat = I18n.t(:"date.formats.default", {:locale => I18n.locale })
else
strpformat = Setting.date_format
end
Expand Down

0 comments on commit 0bef53e

Please sign in to comment.