Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix paths for govuk-frontend assets #740

Merged
merged 14 commits into from
Apr 16, 2024
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN bundle exec rake assets:precompile
RUN cp -r node_modules/govuk-frontend/dist/govuk/assets/. public/assets/

# tidy up installation
RUN rm -rf node_modules log/* tmp/* /tmp && \
RUN rm -rf log/* tmp/* /tmp && \
rm -rf /usr/local/bundle/cache && \
find /usr/local/bundle/gems -name "*.c" -delete && \
find /usr/local/bundle/gems -name "*.h" -delete && \
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/local/govuk.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
//
$govuk-new-link-styles: true;
$govuk-global-styles: true;
$govuk-assets-path: '/assets/govuk-frontend/dist/govuk/assets/';
$govuk-assets-path: '/assets/';

@import 'govuk-frontend/dist/govuk/all';
2 changes: 1 addition & 1 deletion app/controllers/errors_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ def maintenance
private

def respond_with_status(status)
render status:
render formats: [:html], status:
end
end
3 changes: 0 additions & 3 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
config.action_controller.perform_caching = false
config.cache_store = :null_store

# Raise exceptions instead of rendering exception templates.
config.action_dispatch.show_exceptions = false

# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false

Expand Down
1 change: 1 addition & 0 deletions config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Rails.application.config.assets.paths << Emoji.images_path
# Add Yarn node_modules folder to the asset load path.
Rails.application.config.assets.paths << Rails.root.join("node_modules")
Rails.application.config.assets.paths << Rails.root.join("node_modules/govuk-frontend/dist/govuk/assets")

# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in the app/assets
Expand Down
Loading