tramway-core 1.8.2 → 1.8.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 301196e34c11beb97c8e516d2094d0f98af73cb4c8b9e250804730c5d9479c30
4
- data.tar.gz: 03c176c1a8d6e14502af6fb509a28bd7b98a56124551c5ce0cd6d3144ff83bd3
3
+ metadata.gz: e3e9f5d7647d1fada591aa581d40a2191d0aa8ca956702afc98d25f1586de7ff
4
+ data.tar.gz: e169af611b88de678c6a50a93c10b636ffcf451fe3220bcf5ee93581b3732396
5
5
  SHA512:
6
- metadata.gz: 942eae863fdab061a8d9800aae4d89703bc754b58dad72e1b6a2cd4c104de44f0f65e5001e069cab8e406d5b92303fadde3231e70d0596b941923c66f7af1cd5
7
- data.tar.gz: f258d270d6baba789f5fbbc0412767c8f0a4ce9ae3bbb6c1f5633628324a9e028dc105ac1c10571efd4a99b637faa53e94674a8838e67b21f6781a0f2cb2f396
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
- title_text = "#{page_title} | #{@application.title}"
6
- content_for(:title) { title_text }
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
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Core
3
- VERSION = '1.8.2'
3
+ VERSION = '1.8.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2
4
+ version: 1.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov