i18n_rails_helpers 0.17.0 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -71,7 +71,13 @@ module I18nRailsHelpers
71
71
  #
72
72
  def t_title(action = nil, model = nil)
73
73
  action ||= action_name
74
- I18n::translate("#{controller_name.underscore}.#{action}.title", :default => [:"crud.title.#{action}"], :model => t_model(model))
74
+ if model
75
+ context = model.name.pluralize.underscore
76
+ else
77
+ context = controller_name.underscore
78
+ end
79
+
80
+ I18n::translate("#{context}.#{action}.title", :default => [:"crud.title.#{action}"], :model => t_model(model))
75
81
  end
76
82
  alias :t_crud :t_title
77
83
 
@@ -1,3 +1,3 @@
1
1
  module I18nRailsHelpers
2
- VERSION = "0.17.0"
2
+ VERSION = "0.17.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n_rails_helpers
3
3
  version: !ruby/object:Gem::Version
4
- hash: 91
5
- prerelease: false
4
+ hash: 89
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 17
9
- - 0
10
- version: 0.17.0
9
+ - 1
10
+ version: 0.17.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Simon H\xC3\xBCrlimann (CyT)"
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-11-16 00:00:00 +01:00
19
- default_executable:
18
+ date: 2012-01-16 00:00:00 Z
20
19
  dependencies: []
21
20
 
22
21
  description: Rails i18n view helpers for things like crud actions, models and and attributes.
@@ -37,7 +36,6 @@ files:
37
36
  - lib/list_link_helpers.rb
38
37
  - rails/init.rb
39
38
  - README.markdown
40
- has_rdoc: true
41
39
  homepage: https://github.com/huerlisi/i18n_rails_helpers
42
40
  licenses: []
43
41
 
@@ -67,9 +65,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
65
  requirements: []
68
66
 
69
67
  rubyforge_project:
70
- rubygems_version: 1.3.7
68
+ rubygems_version: 1.8.10
71
69
  signing_key:
72
70
  specification_version: 3
73
71
  summary: I18n Rails helpers
74
72
  test_files: []
75
73
 
74
+ has_rdoc: