neuron 0.0.11 → 0.0.12

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.
@@ -25,17 +25,17 @@ module Neuron
25
25
  def page_title(title = nil, options = {})
26
26
  options = default_options.merge(options)
27
27
  options = options.merge(default: navigation_title(title, options))
28
- @page_title ||= title.to_s || view.t('.title', options)
28
+ @page_title ||= title.try(:to_s) || view.t('.title', options)
29
29
  end
30
30
 
31
31
  def navigation_title(title = nil, options = {})
32
32
  options = {default: @page_title || view.view_name.humanize}.merge(default_options).merge(options)
33
- @navigation_title ||= title.to_s || self.class.navigation_title(view.controller_i18n_scope, view.view_name, options)
33
+ @navigation_title ||= title.try(:to_s) || self.class.navigation_title(view.controller_i18n_scope, view.view_name, options)
34
34
  end
35
35
 
36
36
  def head_title(title = nil, options = {})
37
37
  options = default_options.merge(options)
38
- @head_title ||= title.to_s || view.strip_tags([navigation_title, application.title].compact.join(options[:title_separator]))
38
+ @head_title ||= title.try(:to_s) || view.strip_tags([navigation_title, application.title].compact.join(options[:title_separator]))
39
39
  end
40
40
 
41
41
  protected
@@ -1,3 +1,3 @@
1
1
  module Neuron
2
- VERSION = '0.0.11'
2
+ VERSION = '0.0.12'
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: neuron
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.11
5
+ version: 0.0.12
6
6
  platform: ruby
7
7
  authors:
8
8
  - Alexander Semyonov
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-09-04 00:00:00 Z
13
+ date: 2011-09-05 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties