diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2018-02-22 19:05:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-22 19:05:21 -0500 |
commit | 9d7fec6eed9279e710492bff0724a654ecd7baf2 (patch) | |
tree | c16d9f472b4e8107142033541b496104753283c0 /railties/lib | |
parent | 5aa605f5cb5c15a0fa906463eb4afcaebe7c7796 (diff) | |
parent | 9390bff5ce5fcde82840747fae077ba333375211 (diff) | |
download | rails-9d7fec6eed9279e710492bff0724a654ecd7baf2.tar.gz rails-9d7fec6eed9279e710492bff0724a654ecd7baf2.tar.bz2 rails-9d7fec6eed9279e710492bff0724a654ecd7baf2.zip |
Merge pull request #32089 from bogdanvlviv/fix-plugin-generated-files
Fix plugin generated files
Diffstat (limited to 'railties/lib')
2 files changed, 6 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/plugin/templates/app/views/layouts/%namespaced_name%/application.html.erb.tt b/railties/lib/rails/generators/rails/plugin/templates/app/views/layouts/%namespaced_name%/application.html.erb.tt index 6bc480161d..6e54a1ce9d 100644 --- a/railties/lib/rails/generators/rails/plugin/templates/app/views/layouts/%namespaced_name%/application.html.erb.tt +++ b/railties/lib/rails/generators/rails/plugin/templates/app/views/layouts/%namespaced_name%/application.html.erb.tt @@ -2,9 +2,13 @@ <html> <head> <title><%= humanized %></title> + <%%= csrf_meta_tags %> + <%%= csp_meta_tag %> + <%%= stylesheet_link_tag "<%= namespaced_name %>/application", media: "all" %> + <%- unless options[:skip_javascript] -%> <%%= javascript_include_tag "<%= namespaced_name %>/application" %> - <%%= csrf_meta_tags %> + <%- end -%> </head> <body> diff --git a/railties/lib/rails/generators/rails/plugin/templates/bin/rails.tt b/railties/lib/rails/generators/rails/plugin/templates/bin/rails.tt index b3264509fc..ee8e469da2 100644 --- a/railties/lib/rails/generators/rails/plugin/templates/bin/rails.tt +++ b/railties/lib/rails/generators/rails/plugin/templates/bin/rails.tt @@ -19,10 +19,10 @@ require "rails" require "active_model/railtie" require "active_job/railtie" <%= comment_if :skip_active_record %>require "active_record/railtie" +<%= comment_if :skip_active_storage %>require "active_storage/engine" require "action_controller/railtie" <%= comment_if :skip_action_mailer %>require "action_mailer/railtie" require "action_view/railtie" -require "active_storage/engine" <%= comment_if :skip_action_cable %>require "action_cable/engine" <%= comment_if :skip_sprockets %>require "sprockets/railtie" <%= comment_if :skip_test %>require "rails/test_unit/railtie" |