active_record_enumerated_type 0.0.3 → 0.0.4

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDE5MzU2MTc4MWJkMDk0MzNjNWZhZmYxODFmYTlhZjg5Zjk2Zjc1Zg==
4
+ ZDU4NjkxNjRjNjVhMTA3MTRiZmNhZjZiNzkyMDFjNTE2NzdjYWY3ZQ==
5
5
  data.tar.gz: !binary |-
6
- MzJkNDBiZmFjNmE3ODQ0ZDg4NWUwMzFkODI1MGU4YzljZjY5YmJlYQ==
6
+ ZTY4ZmQ3NTJhYjE0NTk5ZmM3ZWJjYjE0NTY0NTAwODI5NGE4ZmMwNA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YjYxMjkzOGI4MDVhMzMzMzljODE2OTNlN2RkYmRkNmI2ZWYyMTQzMmRhMDE2
10
- ZGE4YzYyOGUyMWFkMTM2ZDllYWU2OTVhNmY2ODZhNGVjMTcwZDg3NTc0YmUx
11
- ZTExN2ZjMjBmOWYzZTVjMzNiZWU0ZDQyYWUyMmY1ZGI3OTI1NjA=
9
+ MWMzNjQ4ODQzY2VjNGZmZGM4NDMxMTE0YmQzODllYzk3NjE0NzkyOTlkMDVi
10
+ YjBiMjE3YWE5NGRjYzZiMDkwMzI2MWY1OGE5MTJkNzljMGU1MDNkYTNkNjhk
11
+ MTJhYmU1NzZmMzhlYzMwYmIxMDJmMGI2ZDk0ZmYzYTJiMTU0NGE=
12
12
  data.tar.gz: !binary |-
13
- NzVkNzBkODA0MWM5ZWMzNjkwNTQ2OThkNTY3MmMwOTk5N2I0YTE0NzU3M2Mz
14
- Y2I2MjZmNzk3MWJlYzc3MmVlZWYyZTZmNjAwMDE1Zjk5MzFkNWQwNDgxZDc1
15
- NmE0MTVmMTAwMTY1YWJjN2RlOGFmOWM3MGFkMzAxNTIzMDQzNWE=
13
+ ZTAxMjZjY2Y0YTc0ZTJjNDJlMjczNzk4YjM4N2VjOTAxNzg4MTc4MjZmMTVh
14
+ YWQzMzU5ODAzYzMyZmZkY2FmMTg0ZDQ3NjY3YzNmYzJhODhmMTcyYmY2OWEw
15
+ ZGMyNGEwMGI3MjQ1Y2RmZTkwMmQ0NDVhMmE2YTAxNWFlNTNjM2Q=
@@ -1,10 +1,12 @@
1
+ require "active_support/core_ext"
2
+
1
3
  module EnumeratedType
2
4
  def serialize
3
5
  name
4
6
  end
5
7
 
6
8
  def human
7
- I18n.translate!(name, scope: [:enumerated_type, :status])
9
+ I18n.translate!(name, scope: [:enumerated_type, self.class.name.underscore])
8
10
  rescue I18n::MissingTranslationData
9
11
  to_s.titleize
10
12
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveRecordEnumeratedType
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -4,7 +4,7 @@ describe EnumeratedType do
4
4
  describe "I18n" do
5
5
  it "returns an internationalized name" do
6
6
  allow(I18n).to receive(:translate!)
7
- .with(:finished, scope: [:enumerated_type, :status])
7
+ .with(:finished, scope: [:enumerated_type, "status"])
8
8
  .and_return("finito")
9
9
 
10
10
  expect(Status[:finished].human).to eq "finito"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_enumerated_type
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Eddy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-20 00:00:00.000000000 Z
11
+ date: 2014-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport