Protected method not Inherited
<p>I'm making a change to an API so the new version is being namespaced under an <code>Api::V2</code> module. The old API was just under the <code>API</code> namespace. I want to be able to inherit and overwrite some of the things from the old controller.</p>

<p>It works fine if I do this:</p>

<pre><code>module Api
  module V2
    class ResourcesController &lt; ::Api::ResourcesController 
      include Crud
</code></pre>

<p>The parent class, <code>::Api::ResourcesController</code> defines a <code>model</code> method, which is used here in the <code>options</code> method and also required by the <code>::Api::Crud</code> module.</p>

<pre><code># app/controllers/resources_controller.rb
protected

  def model
    Resource
  end

# app/controllers/concerns/api/crud.rb
def model
  raise "Model must be defined"
end
</code></pre>

<p>However, the changes I need to make are in that <code>Crud</code> module, so I created a namespaced version of that module.</p>

<pre><code># app/controllers/concerns/api/v2/crud.rb
module Api
  module V2
    module Crud
      include ::Api::Crud
      include ::Api::V2::ReadOnly
</code></pre>

<p>So this new module is still using that <code>model</code> method that raises an error if it isn't defined, by including it from <code>::Api::Crud</code>. Now, when I try to use this new module in my controller:</p>

<pre><code># app/controllers/api/vw/resources_controller.rb
module Api
  module V2
    class ResourcesController &lt; ::Api::ResourcesController 
      include ::Api::Crud
</code></pre>

<p>I get the error, <code>Model must be defined</code>. Why is it not able to find the <code>model</code> method defined in my parent controller class?</p>