Skip to content

Commit

Permalink
Merge pull request #57 from epimorphics/spike/resolve-commpn-app-mneu…
Browse files Browse the repository at this point in the history
…-urls

Common App menu link url resolution
  • Loading branch information
jonrandahl authored Nov 27, 2023
2 parents b8df271 + 51aa029 commit 68f2d42
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 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.3 - 20232-11-27

- (Jon) If the app is running in production, and the `relative_url_root` excludes
`/app`, then the app name is appended to the relative_url_root of `/app`
This resolves the urls paths for the apps from the landing page, but not
for the apps themselves

## 1.9.2 - 2023-11-23

- (Jon) Resolves locked ruby version conflict created by using the `=` for the
Expand Down
8 changes: 7 additions & 1 deletion app/models/lr_common_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ def app_link(app_name, request)

# Returns the relative url root for the app if running in a subdirectory
# of the web server, or the root if it is not
# If the app is running in production, and the relative_url_root excludes
# /app, then the app name is appended to the relative_url_root of `/app`
# This resolves the urls paths for the apps from the landing page, but not
# for the apps themselves
def relative_url_root
Rails.application.config.relative_url_root || '/'
root_url = Rails.application.config.relative_url_root || '/'
root_url = "/app#{root_url}" if root_url.exclude?('app') && Rails.env.production?
root_url
end
end
end
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 = 2
PATCH = 3
SUFFIX = nil
VERSION = "#{MAJOR}.#{MINOR}.#{PATCH}#{SUFFIX && ".#{SUFFIX}"}"
end

0 comments on commit 68f2d42

Please sign in to comment.