Skip to content

Commit

Permalink
Merge pull request #65 from epimorphics/spike/64-incorrect-root-url-f…
Browse files Browse the repository at this point in the history
…or-landing-page

Incorrect root url for landing page
  • Loading branch information
jonrandahl authored Sep 4, 2024
2 parents b194606 + 4fbb4d9 commit 637056c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ applications.

## Changes

## 1.9.7 - 2024-09

- (Jon) Resolves issue with the root url `/` being set to `/app/` when the
landing page app is running in production mode. This resolves the urls paths
for the apps to the landing page, but does not change the links to the apps
themselves.

## 1.9.6 - 2024-08

- (Jon) Additional improvements for the suite of apps that use this gem to
Expand Down
4 changes: 2 additions & 2 deletions app/models/lr_common_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ def app_link(app_name, request, css_classes)
# Set the css classes for the link if they are not set
link_classes = set_link_classes(app_name, css_classes, root, request.original_url)
# Sub replaces just the first instance of the app name in the relative_url_root
path = root ? relative_url_root : relative_url_root.sub(%r{[^/]*\Z}, app_name)
path = root ? app_name : relative_url_root.sub(%r{[^/]*\Z}, app_name)
# Add the lang param if it exists
path += "?lang=#{request.params[:lang]}" if request.params.key?(:lang)
path += "?lang=#{request.params[:lang]}" if request.params[:lang].present?
# if the app name is the same as the current app, set the path to the root
t_name = root ? 'common.header.app_title' : "common.app.#{app_name}"
# Set the link id if an id is required
Expand Down
2 changes: 1 addition & 1 deletion lib/lr_common_styles/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module LrCommonStyles
MAJOR = 1
MINOR = 9
PATCH = 6
PATCH = 7
SUFFIX = nil # nil or 'rc' or 'beta' or 'alpha' for pre-release versions
VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}#{SUFFIX && "-#{SUFFIX}"}"
end

0 comments on commit 637056c

Please sign in to comment.