aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/app/assets/config/manifest.js.tt8
-rw-r--r--railties/lib/rails/generators/rails/app/templates/app/assets/manifest.js.tt8
-rw-r--r--railties/lib/rails/generators/rails/plugin/plugin_generator.rb4
-rw-r--r--railties/lib/rails/generators/rails/plugin/templates/rails/dummy_manifest.js6
-rw-r--r--railties/lib/rails/generators/rails/plugin/templates/rails/engine_manifest.js6
5 files changed, 16 insertions, 16 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/app/assets/config/manifest.js.tt b/railties/lib/rails/generators/rails/app/templates/app/assets/config/manifest.js.tt
new file mode 100644
index 0000000000..f80631bac6
--- /dev/null
+++ b/railties/lib/rails/generators/rails/app/templates/app/assets/config/manifest.js.tt
@@ -0,0 +1,8 @@
+
+<% unless options.api? -%>
+//= link_tree ../images
+<% end -%>
+<% unless options.skip_javascript -%>
+//= link_directory ../javascripts .js
+<% end -%>
+//= link_directory ../stylesheets .css
diff --git a/railties/lib/rails/generators/rails/app/templates/app/assets/manifest.js.tt b/railties/lib/rails/generators/rails/app/templates/app/assets/manifest.js.tt
deleted file mode 100644
index 3325553f57..0000000000
--- a/railties/lib/rails/generators/rails/app/templates/app/assets/manifest.js.tt
+++ /dev/null
@@ -1,8 +0,0 @@
-
-<% unless options.api? -%>
-//= link_tree ./images
-<% end -%>
-<% unless options.skip_javascript -%>
-//= link ./javascripts/application.js
-<% end -%>
-//= link ./stylesheets/application.css
diff --git a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb
index 8fea30189e..910c4e743e 100644
--- a/railties/lib/rails/generators/rails/plugin/plugin_generator.rb
+++ b/railties/lib/rails/generators/rails/plugin/plugin_generator.rb
@@ -106,7 +106,7 @@ task default: :test
def test_dummy_assets
template "rails/javascripts.js", "#{dummy_path}/app/assets/javascripts/application.js", force: true
template "rails/stylesheets.css", "#{dummy_path}/app/assets/stylesheets/application.css", force: true
- template "rails/dummy_manifest.js", "#{dummy_path}/app/assets/manifest.js", force: true
+ template "rails/dummy_manifest.js", "#{dummy_path}/app/assets/config/manifest.js", force: true
end
def test_dummy_clean
@@ -124,7 +124,7 @@ task default: :test
end
def assets_manifest
- template "rails/engine_manifest.js", "app/assets/#{underscored_name}_manifest.js"
+ template "rails/engine_manifest.js", "app/assets/config/#{underscored_name}_manifest.js"
end
def stylesheets
diff --git a/railties/lib/rails/generators/rails/plugin/templates/rails/dummy_manifest.js b/railties/lib/rails/generators/rails/plugin/templates/rails/dummy_manifest.js
index ace695a811..8d21b2b6fb 100644
--- a/railties/lib/rails/generators/rails/plugin/templates/rails/dummy_manifest.js
+++ b/railties/lib/rails/generators/rails/plugin/templates/rails/dummy_manifest.js
@@ -1,11 +1,11 @@
<% unless api? -%>
-//= link_tree ./images
+//= link_tree ../images
<% end -%>
<% unless options.skip_javascript -%>
-//= link ./javascripts/application.js
+//= link_directory ../javascripts .js
<% end -%>
-//= link ./stylesheets/application.css
+//= link_directory ../stylesheets .css
<% if mountable? && !api? -%>
//= link <%= underscored_name %>_manifest.js
<% end -%>
diff --git a/railties/lib/rails/generators/rails/plugin/templates/rails/engine_manifest.js b/railties/lib/rails/generators/rails/plugin/templates/rails/engine_manifest.js
index f8ef26982a..2f23844f5e 100644
--- a/railties/lib/rails/generators/rails/plugin/templates/rails/engine_manifest.js
+++ b/railties/lib/rails/generators/rails/plugin/templates/rails/engine_manifest.js
@@ -1,6 +1,6 @@
<% if mountable? -%>
-<% unless options.skip_javascript -%>
-//= link ./javascripts/<%= namespaced_name %>/application.js
+<% if !options.skip_javascript -%>
+//= link_directory ../javascripts/<%= namespaced_name %> .js
<% end -%>
-//= link ./stylesheets/<%= namespaced_name %>/application.css
+//= link_directory ../stylesheets/<%= namespaced_name %> .css
<% end -%>