title: rails 4 namespace :: folder structure models and controllers
body: <p>My current application structure looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/yBLug.png" alt="enter image description here"></p>
  
  <p>An example controller looks like: </p>
  
  <pre><code>class Api::V1::RegisterController &lt; Api::V1::ApiController
  
    def create
      @user                  = ::V1::User.new(user_params)
      @user.email_address    = params[:email_address]
      @user.age_verification = params[:age_verification]
      @user.remote_addr      = request.env['REMOTE_ADDR']
      @user.web_browser      = browser.name.to_s + "(" + browser.version.to_s + ")"
      @user.operating_system = browser.platform.to_s
  
      if @user.save
        head status: 201
      else
        render_bad_request(@user.errors.messages)
      end
    end
  
    private
  
    def user_params
      params.permit(:email_address, :remote_addr, :web_browser, :operating_system, :age_verification)
    end
  
  end
  </code></pre>
  
  <p>An example model looks like:</p>
  
  <pre><code>class V1::User &lt; ActiveRecord::Base
  
    validates_presence_of :remote_addr, :web_browser,
                          :operating_system, :age_verification, :email_address
  
    validates :email_address, uniqueness:   { case_sensitive: false },
                              email_format: { check_mx: true }
  
  end
  </code></pre>
  
  <p><strong>My primary question</strong> here is why am I forced to use <code>::V1</code> in front of my models? Is there a better way around this or am I missing something? </p>