gettext_i18n_rails 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gettext_i18n_rails (0.5.2)
4
+ gettext_i18n_rails (0.5.3)
5
5
  fast_gettext
6
6
 
7
7
  GEM
@@ -15,10 +15,11 @@ module GettextI18nRails::ActiveRecord
15
15
  end
16
16
 
17
17
  def gettext_translation_for_attribute_name(attribute)
18
- if attribute.to_s.ends_with?('_id')
18
+ attribute = attribute.to_s
19
+ if attribute.ends_with?('_id')
19
20
  humanize_class_name(attribute)
20
21
  else
21
- "#{self}|#{attribute.to_s.split('.').map! {|a| a.humanize }.join('|')}"
22
+ "#{self}|#{attribute.split('.').map! {|a| a.humanize }.join('|')}"
22
23
  end
23
24
  end
24
25
  end
@@ -1,3 +1,3 @@
1
1
  module GettextI18nRails
2
- Version = VERSION = '0.5.2'
2
+ Version = VERSION = '0.5.3'
3
3
  end
@@ -27,7 +27,7 @@ describe ActiveRecord::Base do
27
27
 
28
28
  describe :gettext_translation_for_attribute_name do
29
29
  it "translates foreign keys to model name keys" do
30
- Part.gettext_translation_for_attribute_name('car_seat_id').should == 'Car seat'
30
+ Part.gettext_translation_for_attribute_name(:car_seat_id).should == 'Car seat'
31
31
  end
32
32
  end
33
33
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gettext_i18n_rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 2
10
- version: 0.5.2
9
+ - 3
10
+ version: 0.5.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Michael Grosser