diff options
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e39da5f..89b3b6d 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -23,6 +23,17 @@ module ApplicationHelper ).to_html.html_safe, class: 'markdown') end + # Display current application version + def version_string + version = begin + IO.read('.app-version')&.strip + rescue + 'HEAD' + end + + tag.div(link_to(version, INCOMMON.repo_url(version), title: 'Read source code'), class: 'app-version') + end + private # CommonMarker extensions |