i18n_rails_helpers 1.4.4 → 1.4.5
Sign up to get free protection for your applications and to get access to all the features.
- data/app/helpers/bootstrap_helper.rb +11 -7
- data/lib/i18n_rails_helpers/version.rb +1 -1
- metadata +1 -1
@@ -1,13 +1,17 @@
|
|
1
1
|
module BootstrapHelper
|
2
|
-
def boot_page_title(action_or_title = nil, model = nil)
|
3
|
-
if
|
4
|
-
title =
|
2
|
+
def boot_page_title(action_or_title = nil, model = nil, &block)
|
3
|
+
if block_given?
|
4
|
+
title = capture(&block)
|
5
5
|
else
|
6
|
-
|
7
|
-
|
8
|
-
title = resource.to_s
|
6
|
+
if action_or_title.is_a? String
|
7
|
+
title = action_or_title
|
9
8
|
else
|
10
|
-
|
9
|
+
action = action_or_title || action_name
|
10
|
+
if action.to_s == 'show' && defined?(resource) && resource.present?
|
11
|
+
title = resource.to_s
|
12
|
+
else
|
13
|
+
title = t_title(action, model)
|
14
|
+
end
|
11
15
|
end
|
12
16
|
end
|
13
17
|
|