tramway-core 1.8.2 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/tramway/core/title_helper.rb +7 -2
- data/lib/tramway/core/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e3e9f5d7647d1fada591aa581d40a2191d0aa8ca956702afc98d25f1586de7ff
|
|
4
|
+
data.tar.gz: e169af611b88de678c6a50a93c10b636ffcf451fe3220bcf5ee93581b3732396
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 240cce16b3631bd462eb01532856977e5c0fc230a4af4ffd945131f19a1ce947b90e0b886d3f8f98cd533684b50865ec5ea1795537cbd2532fcc93bc9c85bd26
|
|
7
|
+
data.tar.gz: 4d9762d9c7391bbb637dabe89a0f70cbdf570a43d56c0d234c6ddb0267a8f318acc468d5a5faf701bc3ef818a79deecb0d314727dea3fef1112c124bc03c9787
|
|
@@ -2,8 +2,13 @@ module Tramway
|
|
|
2
2
|
module Core
|
|
3
3
|
module TitleHelper
|
|
4
4
|
def title(page_title = default_title)
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
if @application.present?
|
|
6
|
+
title_text = "#{page_title} | #{@application.title}"
|
|
7
|
+
content_for(:title) { title_text }
|
|
8
|
+
else
|
|
9
|
+
error = Tramway::Error.new(plugin: :core, method: :title, message: ('You should set Tramway::Core::Application class using `::Tramway::Core.initialize_application model_class: #{model_class_name}` in config/initializers/tramway.rb'))
|
|
10
|
+
raise error.message
|
|
11
|
+
end
|
|
7
12
|
end
|
|
8
13
|
|
|
9
14
|
def default_title
|
data/lib/tramway/core/version.rb
CHANGED