setler 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/contributors.txt +1 -0
- data/lib/setler/settings.rb +3 -4
- data/lib/setler/version.rb +1 -1
- metadata +2 -2
data/contributors.txt
CHANGED
data/lib/setler/settings.rb
CHANGED
@@ -2,10 +2,10 @@ module Setler
|
|
2
2
|
class Settings < ActiveRecord::Base
|
3
3
|
serialize :value
|
4
4
|
self.abstract_class = true
|
5
|
-
|
5
|
+
|
6
6
|
cattr_accessor :defaults
|
7
7
|
@@defaults = {}.with_indifferent_access
|
8
|
-
|
8
|
+
|
9
9
|
# Get and Set variables when the calling method is the variable name
|
10
10
|
def self.method_missing(method, *args, &block)
|
11
11
|
if respond_to?(method)
|
@@ -34,7 +34,7 @@ module Setler
|
|
34
34
|
var.to_s,
|
35
35
|
@object.try(:class).try(:base_class).try(:to_s),
|
36
36
|
@object.try(:id)
|
37
|
-
).
|
37
|
+
).update_attributes({ :value => value })
|
38
38
|
end
|
39
39
|
|
40
40
|
def self.destroy(var_name)
|
@@ -56,5 +56,4 @@ module Setler
|
|
56
56
|
end
|
57
57
|
|
58
58
|
end
|
59
|
-
|
60
59
|
end
|
data/lib/setler/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: setler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-07-
|
12
|
+
date: 2012-07-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|