enum_help 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b76ebfec1adf5d496385557f9425e1e1a95554c
4
- data.tar.gz: eb49a08c37113ebf0852cad91e2f774d94493f47
3
+ metadata.gz: 130730a1ec4c32004257bbe7546178ca2ca3471f
4
+ data.tar.gz: 7b23d6acc6e7bb1da3a6d4d0072e9393b1f0c516
5
5
  SHA512:
6
- metadata.gz: 80eb30b5f104314e567b1af238a1bb9f5122b4a35701f68788f287c57c84da92178bf6fd3431ba2e40b0a68748c451ecea5500137bc07d9e1bdd332543a89a78
7
- data.tar.gz: 6784941159e554668851e44dfa4e4ad8f28b803d54c55e555a16f148c941bfbbba7958f2d52636375c397b0bf23145f700e08fd326f7b1c33096753cd641e55f
6
+ metadata.gz: 7055d72e832d0c0f8bb9ca85d09845c70fdfa7652729e87f3cf326c5354895a882ff6d9bbca56249adeb99d25cddd03deb2ebcb67c4d4fe1542cdbaa50124e4e
7
+ data.tar.gz: 09a863d5f602f332def876357162829754c273e839fef703da6a256c1795f193063e85ee5696a82732aa005338ade9b25b7cc6dfd11fb74564cffbce437666fc
data/README.md CHANGED
@@ -17,7 +17,7 @@ Version 0.0.15 changes the behaviour of namespaced modules as per [this commit](
17
17
  abc:
18
18
  lorem: 'Ipsum'
19
19
  foo/bar/bat:
20
- abc:
20
+ def:
21
21
  lorem: 'Ipsum'
22
22
 
23
23
  To
@@ -29,7 +29,7 @@ To
29
29
  abc:
30
30
  lorem: 'Ipsum'
31
31
  bat:
32
- abc:
32
+ def:
33
33
  lorem: 'Ipsum'
34
34
 
35
35
  For different I18n backends, adjust accordingly as namespaced modules are now referenced by `.` rather than `/`.
@@ -58,7 +58,7 @@ In model file:
58
58
  ```ruby
59
59
  class Order < ActiveRecord::Base
60
60
  enum status: { "nopayment" => 0, "finished" => 1, "failed" => 2, "destroyed" => 3 }
61
-
61
+
62
62
  def self.restricted_statuses
63
63
  statuses.except :failed, :destroyed
64
64
  end
@@ -20,4 +20,6 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.5"
22
22
  spec.add_development_dependency "rake"
23
+
24
+ spec.add_dependency "activesupport", ">= 3.0.0"
23
25
  end
@@ -1,7 +1,9 @@
1
1
  module EnumHelp
2
2
  class Railtie < Rails::Railtie
3
3
  initializer "enum_help.i18n" do
4
- ActiveRecord::Base.send :extend, EnumHelp::I18n
4
+ ActiveSupport.on_load(:active_record) do
5
+ extend EnumHelp::I18n
6
+ end
5
7
  end
6
8
  end
7
- end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module EnumHelp
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enum_help
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lester Zhao
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-03 00:00:00.000000000 Z
11
+ date: 2017-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: activesupport
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 3.0.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 3.0.0
41
55
  description: " Help ActiveRecord::Enum feature to work fine with I18n and simple_form.
42
56
  \ "
43
57
  email: