Applied rubocop.

This commit is contained in:
Martin Edenhofer 2015-11-10 15:05:29 +01:00
parent 58de72cfc1
commit 3ea2a1aa2e

View file

@ -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
end