title: Rails 4 - Controller uses view path of super controller
body: <p>I have a SwitchesController that inherits from BaseSwitchesController, for the json.</p>
  
  <pre><code>module Api
    module V1
      class SwitchesController &lt; BaseSwitchesController
        respond_to :json
      end
    end
  end
  </code></pre>
  
  <p>I have another SwitchesController, also inheriting from BaseSwitchesController, for the html.</p>
  
  <pre><code>class SwitchesController &lt; BaseSwitchesController
    layout 'application'
  end
  </code></pre>
  
  <p>BaseSwitchesController inherits from ApplicationController.</p>
  
  <pre><code>class BaseSwitchesController &lt; ApplicationController
    def update
      respond_to do |format|
      if @switch.update(switch_params)
        format.html { redirect_to @switch, notice: 'Switch was successfully updated.' }
        format.json { render json: @switch.as_json.merge(:message =&gt; 'set_switch_value') }
      else
        format.html { render action: 'edit' }
        format.json { render json: @switch.errors, status: :unprocessable_entity }
      end
    end
  end
  </code></pre>
  
  <p>I want to move the json to the SwitchesController in the API module.
  The problem is that the methods in SwitchesController are looking for views in views/base_switches, but that folder doesn't exist. It should be looking for views in views/switches, and choose e.g. index.json.rabl.</p>
  
  <p>How can I fix this? Thanks!</p>