enum_accessor 0.1.0 → 0.1.1
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.
- data/README.md +3 -3
- data/enum_accessor.gemspec +3 -3
- data/lib/enum_accessor/version.rb +1 -1
- data/spec/enum_accessor_spec.rb +2 -0
- metadata +4 -4
data/README.md
CHANGED
@@ -16,7 +16,7 @@ Add an integer column.
|
|
16
16
|
|
17
17
|
```ruby
|
18
18
|
create_table :users do |t|
|
19
|
-
t.
|
19
|
+
t.integer :gender, default: 0
|
20
20
|
end
|
21
21
|
```
|
22
22
|
|
@@ -97,10 +97,10 @@ and now `human_*` method returns a translated string. It defaults to English nic
|
|
97
97
|
|
98
98
|
```ruby
|
99
99
|
I18n.locale = :ja
|
100
|
-
user.human_gender
|
100
|
+
user.human_gender # => '女'
|
101
101
|
|
102
102
|
I18n.locale = :en
|
103
|
-
user.human_gender
|
103
|
+
user.human_gender # => 'Female'
|
104
104
|
```
|
105
105
|
|
106
106
|
## Why enum keys are internally stored as strings rather than symbols?
|
data/enum_accessor.gemspec
CHANGED
@@ -8,9 +8,9 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.version = EnumAccessor::VERSION
|
9
9
|
gem.authors = ['Kenn Ejima']
|
10
10
|
gem.email = ['kenn.ejima@gmail.com']
|
11
|
-
gem.description = %q{
|
12
|
-
gem.summary = %q{
|
13
|
-
gem.homepage = ''
|
11
|
+
gem.description = %q{Simple enum fields for ActiveRecord}
|
12
|
+
gem.summary = %q{Simple enum fields for ActiveRecord}
|
13
|
+
gem.homepage = 'https://github.com/kenn/enum_accessor'
|
14
14
|
|
15
15
|
gem.files = `git ls-files`.split($/)
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
data/spec/enum_accessor_spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enum_accessor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -75,7 +75,7 @@ dependencies:
|
|
75
75
|
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
|
-
description:
|
78
|
+
description: Simple enum fields for ActiveRecord
|
79
79
|
email:
|
80
80
|
- kenn.ejima@gmail.com
|
81
81
|
executables: []
|
@@ -95,7 +95,7 @@ files:
|
|
95
95
|
- spec/enum_accessor_spec.rb
|
96
96
|
- spec/locales.yml
|
97
97
|
- spec/spec_helper.rb
|
98
|
-
homepage:
|
98
|
+
homepage: https://github.com/kenn/enum_accessor
|
99
99
|
licenses: []
|
100
100
|
post_install_message:
|
101
101
|
rdoc_options: []
|
@@ -118,7 +118,7 @@ rubyforge_project:
|
|
118
118
|
rubygems_version: 1.8.24
|
119
119
|
signing_key:
|
120
120
|
specification_version: 3
|
121
|
-
summary:
|
121
|
+
summary: Simple enum fields for ActiveRecord
|
122
122
|
test_files:
|
123
123
|
- spec/enum_accessor_spec.rb
|
124
124
|
- spec/locales.yml
|