module EmberCli
  class EmberController < ::ApplicationController
    def index
      render layout: false
    end
  end
end

module EmberCli
  class EmberController < ::ApplicationController
    unless ancestors.include? ActionController::Base
      (
        ActionController::Base::MODULES -
        ActionController::API::MODULES
      ).each do |controller_module|
        include controller_module
      end

      helper EmberRailsHelper
    end

    def index
      render layout: false
    end
  end
end

Add modules to `ember_cli/ember` controller
Add modules to `ember_cli/ember` controller

Closes [#480].

When the `ApplicationController` extends `ActionController::API`, HTML
rendering modules and logic are omitted.

To make the `EmberCli::EmberController` capable of rendering the Ember
application's HTML, this commit ensures those modules are included when
necessary.

[#480]: https://github.com/thoughtbot/ember-cli-rails/issues/480
