mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fix application_controller require_dependency path generated by the scaffold generator
This is follow up to #6643. In #6643, the controller generator only had been fixed, in this commit to fix the scaffold generator.
This commit is contained in:
parent
26aa1b58b0
commit
2e8146909a
2 changed files with 2 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<% if namespaced? -%>
|
||||
require_dependency "<%= namespaced_file_path %>/application_controller"
|
||||
require_dependency "<%= namespaced_path %>/application_controller"
|
||||
|
||||
<% end -%>
|
||||
<% module_namespacing do -%>
|
||||
|
|
|
@ -281,6 +281,7 @@ class NamespacedScaffoldGeneratorTest < NamespacedGeneratorTestCase
|
|||
# Controller
|
||||
assert_file "app/controllers/test_app/admin/roles_controller.rb" do |content|
|
||||
assert_match(/module TestApp\n class Admin::RolesController < ApplicationController/, content)
|
||||
assert_match(%r(require_dependency "test_app/application_controller"), content)
|
||||
end
|
||||
|
||||
assert_file "test/controllers/test_app/admin/roles_controller_test.rb",
|
||||
|
|
Loading…
Reference in a new issue