Skip to content

Commit

Permalink
Merge pull request #58 from petrposvic/fix-mr-50
Browse files Browse the repository at this point in the history
Fix accessing to Setting object
  • Loading branch information
speedy32129 committed Apr 25, 2019
2 parents 88cfc35 + 5fdf788 commit 6ecf2f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/views/time_loggers/_update_menu.html.erb
Expand Up @@ -33,9 +33,9 @@ $.ajax({
This script periodically updates the time tracker menu item to reflect any changes in the tracking state
Refresh rate is taken from settings. If settings is invalid, 60 secs is used. The minimum value is 5 secs.
-->
<%= cache [Setting[:plugin_time_logger][:refresh_rate].to_i, "time_loger_refresh_rate"] do %>
<% update_rate = Setting[:plugin_time_logger][:refresh_rate].to_i * 1000 %>
<%= javascript_tag "var timer = setInterval(updateTimeLoggerMenu, #{update_rate});" %>
<%= cache [Setting[:plugin_time_logger]["refresh_rate"].to_i, "time_logger_refresh_rate"] do %>
<% update_rate = Setting[:plugin_time_logger]["refresh_rate"].to_i %>
<%= javascript_tag "var timer = setInterval(updateTimeLoggerMenu, #{update_rate >= 5 ? update_rate : 60} * 1000);" %>
<% end %>
<% end %>

0 comments on commit 6ecf2f5

Please sign in to comment.