From a4b7f1b1f5c80e9a0b2b9c4e3cf58325a86bc8cf Mon Sep 17 00:00:00 2001 From: Aleksey Ivanov Date: Tue, 23 May 2017 03:47:51 +0300 Subject: [PATCH] Fallback to default value for existing agents --- app/views/agents/agent_views/peak_detector_agent/_show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/agents/agent_views/peak_detector_agent/_show.html.erb b/app/views/agents/agent_views/peak_detector_agent/_show.html.erb index 8736001b..2f5f4a81 100644 --- a/app/views/agents/agent_views/peak_detector_agent/_show.html.erb +++ b/app/views/agents/agent_views/peak_detector_agent/_show.html.erb @@ -5,7 +5,7 @@

Recent Trends

<% @agent.memory[:data].each.with_index do |(group_name, data), index| %>
-
<%= link_to group_name.to_s, format(@agent.options[:search_url], q: CGI::escape(group_name.to_s)), :target => "blank" %>
+
<%= link_to group_name.to_s, format(@agent.options[:search_url].presence || @agent.default_options['search_url'], q: CGI::escape(group_name.to_s)), :target => "blank" %>