mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-14 16:26:32 +01:00
Replace conditional with rescue's
Closes #1015, although this should really be taken care of by finishing #1011.
This commit is contained in:
parent
d8c477eb54
commit
3c82b88720
1 changed files with 5 additions and 7 deletions
|
|
@ -13,16 +13,14 @@
|
||||||
<%= javascript_tag "var SOURCE_VIEW = '#{@source_view}';" %>
|
<%= javascript_tag "var SOURCE_VIEW = '#{@source_view}';" %>
|
||||||
<%= javascript_tag "var TAG_NAME = '#{@tag_name}';" if @tag_name %>
|
<%= javascript_tag "var TAG_NAME = '#{@tag_name}';" if @tag_name %>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<% if defined? context_names_for_autocomplete -%>
|
var contextNames = <%= context_names_for_autocomplete rescue '[]' %>;
|
||||||
var contextNames = <%= context_names_for_autocomplete %>;
|
var projectNames = <%= project_names_for_autocomplete rescue '[]' %>;
|
||||||
var projectNames = <%= project_names_for_autocomplete %>;
|
var defaultContexts = <%= default_contexts_for_autocomplete rescue '{}' %>;
|
||||||
var defaultContexts = <%= default_contexts_for_autocomplete %>;
|
var defaultTags = <%= default_tags_for_autocomplete rescue '{}' %>;
|
||||||
var defaultTags = <%= default_tags_for_autocomplete %>;
|
var tagNames = <%= tag_names_for_autocomplete rescue '[]' %>;
|
||||||
var tagNames = <%= tag_names_for_autocomplete %>;
|
|
||||||
var dateFormat = '<%= date_format_for_date_picker %>';
|
var dateFormat = '<%= date_format_for_date_picker %>';
|
||||||
var weekStart = '<%= current_user.prefs.week_starts %>';
|
var weekStart = '<%= current_user.prefs.week_starts %>';
|
||||||
function relative_to_root(path) { return '<%= root_url %>'+path; };
|
function relative_to_root(path) { return '<%= root_url %>'+path; };
|
||||||
<% end -%>
|
|
||||||
<% if @prefs.refresh != 0 -%>
|
<% if @prefs.refresh != 0 -%>
|
||||||
setup_auto_refresh(<%= @prefs["refresh"].to_i*60000 %>);
|
setup_auto_refresh(<%= @prefs["refresh"].to_i*60000 %>);
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue