traco 3.1.1 → 3.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZTBlNWVjMTY0MjQ4YzU3NGIwNjM0ZTlmYjI0Yzc4NjUyNzY1MGQ5OQ==
4
+ YTc4OWNjMzkxOTcwNzE3NmE4NDM4MDQ4MWM5MGIyMzJkNjRlZWY0OQ==
5
5
  data.tar.gz: !binary |-
6
- NDI5OGU2OGY5MzEwZjEyNWU4MWFlNzYzMjkxMmI1ZWZiZjY5YzYwMw==
6
+ NTYzYTFhZmFjYzk1Yjk1ZTM4NGJhN2QyOGIwNGM1ZTYzZDg0OGI2NQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2M4NGIyNDhlNmI0OTE5YTI1ZTI1ODQyOWE1YmMyZDM4YjM2ZmZlOTk1MjI0
10
- NGQ4OWVhYjk1OTY4Y2UyODJhNGQ1MWIxMzAzNjRhZjU3YjRhMDdlYmMzMzk2
11
- ZTBkMTQzNmFiN2QyZDAzMWFlODk4OWQ2ODYzNGYzYjQ5ZGY4MDQ=
9
+ MWRjNTM2ZjcyYTZhNTliYmUzNjg4OWJlZTBiMTdjMTA3NzM1ODBkMTJlOGVi
10
+ NjQzZmJhMzhkMTA5YjdkYmQzY2NiODk3YzM2YzMzZWNiMGMzNGYzYWEyYWZj
11
+ Nzg3NzE4OGE4NDE5OWE2YjQyNzI1OTAyN2I2MWMwZTk5ZmNiYmY=
12
12
  data.tar.gz: !binary |-
13
- ZDYzMDJkZTJhNjVjZTQ3YTZkNjExMTM3YmZlMTI5YmE0ZGVjYmM5OWUyMjc3
14
- Y2ZmMzMxNzMxNTY0MmUzN2NhNGIwYmYwMzVjNjAzYjQxNmQxMGFmY2NhOTAw
15
- ZTM5NzcyODM1Yzc3MDBkN2Q5MTE5OTE1YjVlNmE3NmY0MzIxM2E=
13
+ YzY1OGI0MTc3OTNhOGU2NzJhYWQxYWU3YzI2N2IwZWM0MGQxNDY4Yjc1MGE3
14
+ NDY3ZTBiNTc5MDNiNzNlNzEyNTEwNTNhNjc2MTEwOWVmZDgyNDkzNmVkNjdi
15
+ NDhmMDBkMmFlMjNiNWI4NTJmMTRlMTM5N2NmYzliMTU1ZjExODc=
@@ -19,7 +19,7 @@ module Traco
19
19
  end
20
20
 
21
21
  def current_locale_column(attribute)
22
- :"#{attribute}_#{I18n.locale}"
22
+ :"#{attribute}_#{I18n.locale.to_s.downcase.sub("-", "_")}"
23
23
  end
24
24
 
25
25
  def human_attribute_name(attribute, options = {})
@@ -1,3 +1,3 @@
1
1
  module Traco
2
- VERSION = "3.1.1"
2
+ VERSION = "3.1.2"
3
3
  end
@@ -83,6 +83,11 @@ describe Post, ".current_locale_column" do
83
83
  I18n.locale = :sv
84
84
  expect(Post.current_locale_column(:title)).to eq :title_sv
85
85
  end
86
+
87
+ it "returns the column name with right format for the current locale with region identifier" do
88
+ I18n.locale = :"pt-BR"
89
+ expect(Post.current_locale_column(:title)).to eq :title_pt_br
90
+ end
86
91
  end
87
92
 
88
93
  describe Post, "#title" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: traco
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrik Nyh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-25 00:00:00.000000000 Z
11
+ date: 2014-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord