golden-setting 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/golden/setting/base.rb +3 -3
- data/lib/golden/setting/form_option.rb +1 -5
- data/lib/golden/setting/resource.rb +1 -1
- data/lib/golden/setting/version.rb +1 -1
- data/spec/support/schema.rb +0 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8b89e8764d11236ad5ca0709c5b5ce5e1e5a875
|
4
|
+
data.tar.gz: b1f5aba54dc0e274f9c005f6799405aab1fa1fc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32ecf79f0dd4c2ec9d827d0a7494edca8235872d056aec8079ccc0c21bd7ab7b59fa2e6935ecdd0a585e95ab20f2e337dc743068dbcb08e3508b3bce198e2aff
|
7
|
+
data.tar.gz: be0de4aead01665c0ba514d65a9496c46465b1cda82f651cdcad1249e16cfe8dd10eb678426a0948a258ed3d9bea5971a063d373c69144ddcfc8d4d8ba863913
|
data/lib/golden/setting/base.rb
CHANGED
@@ -19,7 +19,7 @@ module Golden
|
|
19
19
|
without_resource.where(name: name)
|
20
20
|
end
|
21
21
|
|
22
|
-
def select_object fields = %w{name value}
|
22
|
+
def select_object fields = %w{name value form_options}
|
23
23
|
without_resource.select(fields)
|
24
24
|
end
|
25
25
|
|
@@ -39,8 +39,8 @@ module Golden
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
-
# def initialize attributes = nil
|
43
|
-
# super attributes
|
42
|
+
# def initialize attributes = nil
|
43
|
+
# super attributes
|
44
44
|
# end
|
45
45
|
end
|
46
46
|
end
|
@@ -9,6 +9,7 @@ module Golden
|
|
9
9
|
collection: []
|
10
10
|
}
|
11
11
|
serialize :form_options
|
12
|
+
after_initialize :form_options
|
12
13
|
end
|
13
14
|
|
14
15
|
module ClassMethods
|
@@ -25,11 +26,6 @@ module Golden
|
|
25
26
|
end
|
26
27
|
end
|
27
28
|
|
28
|
-
def initialize attributes = nil, options = {}
|
29
|
-
super attributes, options
|
30
|
-
self.form_options
|
31
|
-
end
|
32
|
-
|
33
29
|
def form_options
|
34
30
|
case self[:form_options]
|
35
31
|
when String
|
@@ -35,7 +35,7 @@ module Golden
|
|
35
35
|
named(name, resource).first_or_initialize
|
36
36
|
end
|
37
37
|
|
38
|
-
def select_object fields = %w{name value}, resource = @resource
|
38
|
+
def select_object fields = %w{name value form_options}, resource = @resource
|
39
39
|
with_resource(resource).select(fields)
|
40
40
|
end
|
41
41
|
end
|
data/spec/support/schema.rb
CHANGED