Skip to content

Commit d1498e1

Browse files
committed
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]: #480
1 parent 19361c1 commit d1498e1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

app/controller/ember_cli/ember_controller.rb

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
module EmberCli
22
class EmberController < ::ApplicationController
3+
unless ancestors.include? ActionController::Base
4+
(
5+
ActionController::Base::MODULES -
6+
ActionController::API::MODULES
7+
).each do |controller_module|
8+
include controller_module
9+
end
10+
11+
helper EmberRailsHelper
12+
end
13+
314
def index
415
render layout: false
516
end

0 commit comments

Comments
 (0)