Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing gemspec.

  • Loading branch information...
commit e999b7a2e44042c0a5a2e1a465682447aa75334a 1 parent aeb49f8
@kenn authored
View
6 README.md
@@ -16,7 +16,7 @@ Add an integer column.
```ruby
create_table :users do |t|
- t.column :gender, :integer, default: 0
+ t.integer :gender, default: 0
end
```
@@ -97,10 +97,10 @@ and now `human_*` method returns a translated string. It defaults to English nic
```ruby
I18n.locale = :ja
-user.human_gender # => '女'
+user.human_gender # => '女'
I18n.locale = :en
-user.human_gender # => 'Female'
+user.human_gender # => 'Female'
```
## Why enum keys are internally stored as strings rather than symbols?
View
6 enum_accessor.gemspec
@@ -8,9 +8,9 @@ Gem::Specification.new do |gem|
gem.version = EnumAccessor::VERSION
gem.authors = ['Kenn Ejima']
gem.email = ['kenn.ejima@gmail.com']
- gem.description = %q{Enum field support for ActiveModel with validations and i18n}
- gem.summary = %q{Enum field support for ActiveModel with validations and i18n}
- gem.homepage = ''
+ gem.description = %q{Simple enum fields for ActiveRecord}
+ gem.summary = %q{Simple enum fields for ActiveRecord}
+ gem.homepage = 'https://github.com/kenn/enum_accessor'
gem.files = `git ls-files`.split($/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
View
2  lib/enum_accessor/version.rb
@@ -1,3 +1,3 @@
module EnumAccessor
- VERSION = '0.1.0'
+ VERSION = '0.1.1'
end
View
2  spec/enum_accessor_spec.rb
@@ -52,6 +52,8 @@ class User < ActiveRecord::Base
it 'adds class methods' do
User.genders.should == { :female => 0, :male => 1 }
+ User.genders[:female].should == 0
+ User.genders(:female).should == 0
end
it 'adds validation' do
Please sign in to comment.
Something went wrong with that request. Please try again.