title: Rails: controller cannot recognize class from module/namespace - uninitialized constant
body: <p>I've created directory for API logic: app/api/EtherumAPI/V1 and put there following code:</p>
  
  <pre><code>module EtherumAPI
      module V1
          class Request
  
  
              class &lt;&lt; self
                  def trancation
                  end 
              end
          end 
      end
  end
  </code></pre>
  
  <p>Registered in my application.rb: </p>
  
  <pre><code>config.autoload_paths &lt;&lt; "#{Rails.root}/app/api"
  config.eager_load_paths &lt;&lt; "#{Rails.root}/app/api"
  </code></pre>
  
  <p>And try to call it inside my controller: </p>
  
  <pre><code>  def index
      @test = EtherumAPI::V1::Request
      @test.trancation
    end
  </code></pre>
  
  <p>But I got this error:</p>
  
  <blockquote>
    <p>uninitialized constant HomeController::EtherumAPI</p>
  </blockquote>
  
  <p>I tried also something like "include EtherumAPI::V1" but it didn't succeed as well. How can I fix it and be able to call methods from Request class?</p>