From 3e33ab15d56e95eb54aa1addcf7ac97c20366a66 Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Wed, 10 Sep 2014 10:17:33 +0200 Subject: [PATCH] Put automatically generated settings subclasses to Endpoint namespace --- lib/travis/api/app/endpoint/setting_endpoint.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/travis/api/app/endpoint/setting_endpoint.rb b/lib/travis/api/app/endpoint/setting_endpoint.rb index b7c47b76..dc1fb13a 100644 --- a/lib/travis/api/app/endpoint/setting_endpoint.rb +++ b/lib/travis/api/app/endpoint/setting_endpoint.rb @@ -9,11 +9,11 @@ class Travis::Api::App # a new SettingsEndpoint subclass, which will be then used as an endpoint def subclass(name) class_name = name.to_s.camelize - if Travis::Api::App.const_defined?(class_name) - Travis::Api::App.const_get(class_name) + if Travis::Api::App::Endpoint.const_defined?(class_name) + Travis::Api::App::Endpoint.const_get(class_name) else klass = create_settings_class(name) - Travis::Api::App.const_set(class_name, klass) + Travis::Api::App::Endpoint.const_set(class_name, klass) klass end end