#
# == RobotsController
#
class RobotsController < ApplicationController
  layout false

  def index
    expires_in 12.hours, public: true

    if Rails.env.production?
      render 'allow'
    else
      render 'disallow'
    end
  end
end

#
# == RobotsController
#
class RobotsController < ActionController::Base
  layout false

  def index
    expires_in 12.hours, public: true

    if Rails.env.production?
      render 'allow'
    else
      render 'disallow'
    end
  end
end

Make RobotsController inherit from ActionController::Base
Make RobotsController inherit from ActionController::Base
