From 3ea2a1aa2ef45b1fd59b178157429d39428d0cc8 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 10 Nov 2015 15:05:29 +0100 Subject: [PATCH] Applied rubocop. --- lib/sessions/event.rb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/sessions/event.rb b/lib/sessions/event.rb index 685c41104..732e248e6 100644 --- a/lib/sessions/event.rb +++ b/lib/sessions/event.rb @@ -2,17 +2,17 @@ class Sessions::Event include ApplicationLib def self.run(event, data, session, client_id) - adapter = "Sessions::Event::#{event.to_classname}" - begin - backend = load_adapter(adapter) - rescue => e - return { error: "No such event #{event}" } - end + adapter = "Sessions::Event::#{event.to_classname}" + begin + backend = load_adapter(adapter) + rescue => e + return { error: "No such event #{event}" } + end - ActiveRecord::Base.establish_connection - result = backend.run(data, session, client_id) - ActiveRecord::Base.remove_connection - result + ActiveRecord::Base.establish_connection + result = backend.run(data, session, client_id) + ActiveRecord::Base.remove_connection + result end -end \ No newline at end of file +end