qui-common-helpers 0.0.3 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/qui-common-helpers.rb +4 -3
- metadata +3 -3
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ begin
|
|
9
9
|
gemspec.email = "marcin@saepia.net"
|
10
10
|
gemspec.homepage = "http://q.saepia.net"
|
11
11
|
gemspec.authors = ["Marcin Lewandowski"]
|
12
|
-
gemspec.version = "0.0.
|
12
|
+
gemspec.version = "0.0.5"
|
13
13
|
gemspec.files = Rake::FileList.new [ "MIT-LICENSE", "Rakefile", "lib/*" ]
|
14
14
|
end
|
15
15
|
rescue LoadError
|
data/lib/qui-common-helpers.rb
CHANGED
@@ -50,10 +50,11 @@ module QUI
|
|
50
50
|
end
|
51
51
|
|
52
52
|
module ClassMethods
|
53
|
-
def
|
54
|
-
|
53
|
+
def validates_enum_of(attribute_name)
|
54
|
+
validates_inclusion_of attribute_name, :in => I18n.t("activerecord.enums.#{table_name.singularize}.#{attribute_name}").collect{|k,v| k.to_s.to_i }
|
55
55
|
end
|
56
|
-
|
56
|
+
|
57
|
+
|
57
58
|
def has_link_default_description(field)
|
58
59
|
@link_default_description_field = field
|
59
60
|
class << self
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qui-common-helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Marcin Lewandowski
|