Skip to content

Commit 5305904

Browse files
committed
Removed old debugging code from eval tests. Leaving the alerts/index.html.erb eval because it's dealing with data under our control.
1 parent 807f75e commit 5305904

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

app/models/team.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -838,13 +838,7 @@ def record_exit(viewer, exit_url, exit_target_type, furthest_scrolled, time_spen
838838
end
839839

840840
def detailed_visitors(since = 0)
841-
i = 1
842841
REDIS.zrangebyscore(user_detail_views_key, since, Time.now.to_i).map do |visitor_string|
843-
844-
Rails.logger.warn("[EVAL:#{i}] Team#detailed_visitors(since = #{since.inspect}) set to eval visitor_string = #{visitor_string.inspect}")
845-
i += 1
846-
847-
#visitor = eval(visitor_string)
848842
visitor = HashStringParser.better_than_eval(visitor_string)
849843
visitor[:user] = identify_visitor(visitor[:user_id])
850844
visitor

app/views/alerts/index.html.haml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
-content_for :head do
1+
- content_for :head do
22
= stylesheet_link_tag 'admin'
33

44
%ul.alerts
55
- @alerts.each do |alert|
6-
- i = 1
7-
- alert[:data].each { |ds, t| Rails.logger.warn("[EVAL:#{i}] view alerts#index set to eval ds = #{ds.inspect}") ; i += 1 }
86
- alert[:data].map { |ds, t| [ eval(ds).with_indifferent_access, Time.at(t.to_i) ] }.each do |data, time|
97
%li
108
.when== #{time_ago_in_words(time)} ago

0 commit comments

Comments
 (0)