Skip to content

Commit 83b80af

Browse files
authored
Fix paths for govuk-frontend assets (#740)
1 parent 5ccbf3d commit 83b80af

File tree

5 files changed

+4
-6
lines changed

5 files changed

+4
-6
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ RUN bundle exec rake assets:precompile
3939
RUN cp -r node_modules/govuk-frontend/dist/govuk/assets/. public/assets/
4040

4141
# tidy up installation
42-
RUN rm -rf node_modules log/* tmp/* /tmp && \
42+
RUN rm -rf log/* tmp/* /tmp && \
4343
rm -rf /usr/local/bundle/cache && \
4444
find /usr/local/bundle/gems -name "*.c" -delete && \
4545
find /usr/local/bundle/gems -name "*.h" -delete && \

app/assets/stylesheets/local/govuk.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
//
44
$govuk-new-link-styles: true;
55
$govuk-global-styles: true;
6-
$govuk-assets-path: '/assets/govuk-frontend/dist/govuk/assets/';
6+
$govuk-assets-path: '/assets/';
77

88
@import 'govuk-frontend/dist/govuk/all';

app/controllers/errors_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ def maintenance
3232
private
3333

3434
def respond_with_status(status)
35-
render status:
35+
render formats: [:html], status:
3636
end
3737
end

config/environments/test.rb

-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
config.action_controller.perform_caching = false
2828
config.cache_store = :null_store
2929

30-
# Raise exceptions instead of rendering exception templates.
31-
config.action_dispatch.show_exceptions = false
32-
3330
# Disable request forgery protection in test environment.
3431
config.action_controller.allow_forgery_protection = false
3532

config/initializers/assets.rb

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# Rails.application.config.assets.paths << Emoji.images_path
88
# Add Yarn node_modules folder to the asset load path.
99
Rails.application.config.assets.paths << Rails.root.join("node_modules")
10+
Rails.application.config.assets.paths << Rails.root.join("node_modules/govuk-frontend/dist/govuk/assets")
1011

1112
# Precompile additional assets.
1213
# application.js, application.css, and all non-JS/CSS in the app/assets

0 commit comments

Comments
 (0)