acts_as_enum 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/CHANGELOG +3 -0
  2. data/TODO +5 -0
  3. data/VERSION +1 -1
  4. data/lib/acts_as_enum.rb +1 -0
  5. metadata +19 -27
data/CHANGELOG CHANGED
@@ -16,3 +16,6 @@
16
16
 
17
17
  1.0.1
18
18
  Options :in value is Array, can be have two or three elements
19
+
20
+ 1.0.2
21
+ Fixed a bug for #{boolean_column_attr}_name method
data/TODO ADDED
@@ -0,0 +1,5 @@
1
+ 会继续添加如下功能
2
+
3
+ 1) 将会支持in里面的数组元素是符号类型
4
+
5
+ 2) 将会支参数in是Hash类型
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.2
data/lib/acts_as_enum.rb CHANGED
@@ -92,6 +92,7 @@ module ActsAsEnum
92
92
  end
93
93
 
94
94
  def #{attr}_name
95
+ return #{plural_upcase_attr}[#{attr}] if #{attr}.is_a?(FalseClass)
95
96
  #{plural_upcase_attr}[#{attr}] unless #{attr}.blank?
96
97
  end
97
98
  })
metadata CHANGED
@@ -1,61 +1,53 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: acts_as_enum
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.2
4
5
  prerelease:
5
- version: 1.0.1
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - LiangWenKe
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-07-27 00:00:00 Z
12
+ date: 2011-11-02 00:00:00.000000000Z
14
13
  dependencies: []
15
-
16
- description: "\xE4\xB8\xBB\xE8\xA6\x81\xE5\xBA\x94\xE7\x94\xA8\xE4\xBA\x8E\xE6\x9C\x89\xE6\x9E\x9A\xE4\xB8\xBE\xE7\xB1\xBB\xE5\x9E\x8B\xE5\xB1\x9E\xE6\x80\xA7\xE7\x9A\x84Model\xEF\xBC\x8C\xE8\xBF\x99\xE4\xB8\xAA\xE6\x8F\x92\xE4\xBB\xB6\xE4\xBC\x9A\xE5\xB8\xAE\xE6\x88\x91\xE4\xBB\xAC\xE7\x94\x9F\xE6\x88\x90\xE4\xB8\x80\xE4\xBA\x9B\xE5\xB8\xB8\xE7\x94\xA8\xE5\x88\xB0\xE7\x9A\x84\xE6\x96\xB9\xE6\xB3\x95\xE3\x80\x82"
14
+ description: 主要应用于有枚举类型属性的Model,这个插件会帮我们生成一些常用到的方法。
17
15
  email: liangwenke.com@gmail.com
18
16
  executables: []
19
-
20
17
  extensions: []
21
-
22
18
  extra_rdoc_files: []
23
-
24
- files:
19
+ files:
25
20
  - lib/acts_as_enum.rb
26
21
  - lib/tasks/acts_as_enum_tasks.rake
27
22
  - CHANGELOG
28
23
  - MIT-LICENSE
29
24
  - Rakefile
30
25
  - README.rdoc
26
+ - TODO
31
27
  - VERSION
32
28
  - init.rb
33
29
  homepage: http://github.com/liangwenke/acts_as_enum
34
30
  licenses: []
35
-
36
31
  post_install_message:
37
32
  rdoc_options: []
38
-
39
- require_paths:
33
+ require_paths:
40
34
  - lib
41
- required_ruby_version: !ruby/object:Gem::Requirement
35
+ required_ruby_version: !ruby/object:Gem::Requirement
42
36
  none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: "0"
47
- required_rubygems_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ! '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ required_rubygems_version: !ruby/object:Gem::Requirement
48
42
  none: false
49
- requirements:
50
- - - ">="
51
- - !ruby/object:Gem::Version
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
52
46
  version: 1.3.4
53
47
  requirements: []
54
-
55
48
  rubyforge_project: acts_as_enum
56
- rubygems_version: 1.8.5
49
+ rubygems_version: 1.8.10
57
50
  signing_key:
58
51
  specification_version: 3
59
52
  summary: Enum Attribute for Rails ActiveRecord
60
53
  test_files: []
61
-