tiny_support 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6caf22f83da20d979bc233566082ab3cdfccfbfb
|
4
|
+
data.tar.gz: ce5f67000547082932accad4cb6f92adee6df28f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bda9c8094e9964784ad17c4d9e6381c2c82676fa5fd3d9a6e06e2bdb9e1fc5a8229dbbc62023ea1250d2f3a54906414fc417d883efc8ef9f2c1e2a2bbe422855
|
7
|
+
data.tar.gz: 41e08f999388a171af9ba6db097b820a6db55b98cf3c287d65cd95d07e11e57a26639a27706565e46921d0a5b1ba468ad9ea452dadda3767ce48aff0aac9b116
|
@@ -28,14 +28,19 @@ module TinySupport
|
|
28
28
|
_configs = ::TinyUtil::Config.new(configs)
|
29
29
|
self.class_variable_set("@@#{_class_config_name}", _configs)
|
30
30
|
|
31
|
-
scope :status_of, ->(key) do
|
32
|
-
|
33
|
-
end
|
31
|
+
# scope :status_of, ->(key) do
|
32
|
+
# where(:status => _configs.find_by_key(_key).value)
|
33
|
+
# end
|
34
34
|
|
35
35
|
define_method :"#{field_name}" do
|
36
36
|
_configs.find_by_value(send(:"#{field_name}_value"))
|
37
37
|
end
|
38
38
|
|
39
|
+
define_method :"#{field_name}_display" do
|
40
|
+
_config = _configs.find_by_value(send(:"#{field_name}_value"))
|
41
|
+
_config.item
|
42
|
+
end
|
43
|
+
|
39
44
|
define_method :"#{field_name}_key" do
|
40
45
|
_configs.find_by_value(send(:"#{field_name}_value")).key
|
41
46
|
end
|
@@ -52,4 +57,4 @@ module TinySupport
|
|
52
57
|
end
|
53
58
|
end
|
54
59
|
end
|
55
|
-
|
60
|
+
|
data/lib/tiny_support/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiny_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- happy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|