From f88c80e6b9c53a793bf204a36c4d196b5a21f7e4 Mon Sep 17 00:00:00 2001 From: TokyoIncidents Date: Fri, 20 Apr 2012 00:27:25 +0900 Subject: [PATCH] Change pusher_api_key to more simple #9 --- app.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app.rb b/app.rb index 7d4cb6e..579ec26 100644 --- a/app.rb +++ b/app.rb @@ -32,12 +32,8 @@ end helpers do - def pusher_api_key - if ENV["RACK_ENV"] == "development" - ENV["PUSHER_KEY"] - else - URI.parse(ENV["PUSHER_URL"]).user - end + def pusher_api_key + ENV["RACK_ENV"] == "development" ? ENV["PUSHER_KEY"] : URI.parse(ENV["PUSHER_URL"]).user end end