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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64763876554cc8a8879adccac8a0a09d0bc9b3d9
4
- data.tar.gz: 7ed2e3e26301b8c437f2f897a962601478582b93
3
+ metadata.gz: c8b89e8764d11236ad5ca0709c5b5ce5e1e5a875
4
+ data.tar.gz: b1f5aba54dc0e274f9c005f6799405aab1fa1fc6
5
5
  SHA512:
6
- metadata.gz: 3e4ae0a30394dd9309c747798cdbd958e619fca398f9e9250ac1786618754a524f7a64605e97619cd7659fc2b7da41a938e6ccc9ee65c46be2d334b23ba288d0
7
- data.tar.gz: 30169adda9dda921b34950882cd27cfe363e834cd945c6781c1bc439ae652e9f3f648055c85e9f2ce7687afa611b7301375d9b10a8c821054f1ff2f67b92edf2
6
+ metadata.gz: 32ecf79f0dd4c2ec9d827d0a7494edca8235872d056aec8079ccc0c21bd7ab7b59fa2e6935ecdd0a585e95ab20f2e337dc743068dbcb08e3508b3bce198e2aff
7
+ data.tar.gz: be0de4aead01665c0ba514d65a9496c46465b1cda82f651cdcad1249e16cfe8dd10eb678426a0948a258ed3d9bea5971a063d373c69144ddcfc8d4d8ba863913
@@ -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, options = {}
43
- # super attributes, options
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
@@ -1,5 +1,5 @@
1
1
  module Golden
2
2
  module Setting
3
- VERSION = '0.3.0'
3
+ VERSION = '0.4.0'
4
4
  end
5
5
  end
@@ -1,4 +1,3 @@
1
- require 'active_support/core_ext/logger'
2
1
  require 'active_record'
3
2
  require 'sqlite3'
4
3
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: golden-setting
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tse-Ching Ho