From 39436f4554c5cc1d27f340e810b1966c005815db Mon Sep 17 00:00:00 2001 From: douglascalhoun Date: Fri, 8 Nov 2013 15:14:47 -0800 Subject: [PATCH] cleaner check for subscribed --- web/app.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/app.rb b/web/app.rb index c2cea72..de7f737 100644 --- a/web/app.rb +++ b/web/app.rb @@ -29,11 +29,11 @@ resp[:categories].push({ :id => l[:layer_id], :name => l[:name], - :subscribed => !subscribed.select {|s| s[:layer_id] == l[:layer_id]}.empty? + :subscribed => subscribed.any? {|s| s[:layer_id] == l[:layer_id]} }) end # Respond with JSON content_type :json resp.to_json -end \ No newline at end of file +end