diff options
Diffstat (limited to 'app/helpers/layout_helper.rb')
| -rw-r--r-- | app/helpers/layout_helper.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/helpers/layout_helper.rb b/app/helpers/layout_helper.rb new file mode 100644 index 0000000..03917d5 --- /dev/null +++ b/app/helpers/layout_helper.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module LayoutHelper + # Returns a strign containing the string to be used for the <title> HTML tag. + def page_title + title = ENV.fetch('OPERUM_BASE_TITLE', 'Operum') + + if @subtitle + "#{@subtitle} - #{title}" + else + title + end + end +end |
