has_enum 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/has_enum.gemspec +2 -2
- data/lib/has_enum/active_record.rb +1 -0
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/has_enum.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{has_enum}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andreas Korth", "Konstantin Shabanov"]
|
12
|
-
s.date = %q{2010-12-
|
12
|
+
s.date = %q{2010-12-09}
|
13
13
|
s.email = %q{kes.eclipse@gmail.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE.txt",
|
@@ -54,6 +54,7 @@ module HasEnum
|
|
54
54
|
|
55
55
|
define_method "human_#{attribute}" do
|
56
56
|
begin
|
57
|
+
return nil unless self.send(attribute)
|
57
58
|
key = "activerecord.attributes.#{self.class.name.underscore}.#{attribute}_enum.#{self.send(attribute)}"
|
58
59
|
translation = I18n.translate(key, :raise => true)
|
59
60
|
rescue I18n::MissingTranslationData
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 2
|
9
|
+
version: 0.3.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Andreas Korth
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-09 00:00:00 +06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -221,7 +221,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
221
221
|
requirements:
|
222
222
|
- - ">="
|
223
223
|
- !ruby/object:Gem::Version
|
224
|
-
hash:
|
224
|
+
hash: 2849921123741147368
|
225
225
|
segments:
|
226
226
|
- 0
|
227
227
|
version: "0"
|