Business intelligence made simple
Show variables next to query
Andrew Kanea5def3cccb50
diff --git a/app/controllers/blazer/queries_controller.rb b/app/controllers/blazer/queries_controller.rbindex ad0cf9d2..5de20192 100644--- a/app/controllers/blazer/queries_controller.rb+++ b/app/controllers/blazer/queries_controller.rb@@ -176,6 +176,7 @@ module Blazerdef extract_vars(statement)statement.scan(/\{.*?\}/).map { |v| v[1...-1] }.uniqend+ helper_method :extract_varsdef process_vars(statement)@bind_vars = extract_vars(statement)diff --git a/app/views/blazer/queries/index.html.erb b/app/views/blazer/queries/index.html.erbindex e285f20c..4e0f50ff 100644--- a/app/views/blazer/queries/index.html.erb+++ b/app/views/blazer/queries/index.html.erb@@ -18,6 +18,7 @@<tr><td class="query"><%= link_to query.name, query %>+ <span style="color: #ccc;"><%= extract_vars(query.statement).join(", ") %></span><% if query.created_at > 2.days.ago %><small style="font-weight: bold; color: #5cb85c;">NEW</small><% end %>