groupped_settings 0.2.1.18733 → 0.2.2.18778
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/groupped/settings.rb +2 -2
- data/lib/groupped/settings/group.rb +2 -2
- data/lib/groupped/settings/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d5b62d16c17083420b41edeb1bbf4729f68a96b410506a8e9f717f6eecd9748
|
4
|
+
data.tar.gz: e116faeaafbf96595c680deef18651f899bd1eef6f1cf24a4fd89a265f47e281
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3baa4f131ce3a4225931076000c6b1e63186a2b1c33bcffe2421e1553f8746c3a74600c5014befedfe10e0fc7c4d2de70f56d5f5f8f62c8e535a08a824dba32
|
7
|
+
data.tar.gz: d1a83cc4c837094fe7f05315e934d8f101f34bbecdd746c8d9b0187d5e376b1fa79d93ee993f3ca734268a8b05ef6a0dc9325b48cdc42d3752687083d2eebb9b
|
data/lib/groupped/settings.rb
CHANGED
@@ -18,8 +18,8 @@ module Groupped
|
|
18
18
|
|
19
19
|
class << self
|
20
20
|
|
21
|
-
def [](group, klass = Group, target: nil)
|
22
|
-
klass.new(Record.where(group: group.downcase, target: target).first_or_create!)
|
21
|
+
def [](group, klass = Group, target: nil, settings: {})
|
22
|
+
klass.new(Record.where(group: group.downcase, target: target).first_or_create!(settings: settings))
|
23
23
|
end
|
24
24
|
|
25
25
|
def configure
|
@@ -24,8 +24,8 @@ module Groupped
|
|
24
24
|
Record.sanitize(settings).slice(*self.attribute_names)
|
25
25
|
end
|
26
26
|
|
27
|
-
def self.load(target: nil)
|
28
|
-
Groupped::Settings[self.group_name, self, target: target]
|
27
|
+
def self.load(target: nil, settings: {})
|
28
|
+
Groupped::Settings[self.group_name, self, target: target, settings: settings]
|
29
29
|
end
|
30
30
|
|
31
31
|
def initialize(record)
|