andrewtimberlake-couch_potato 0.2.8.2 → 0.2.8.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -23,8 +23,13 @@ module CouchPotato
|
|
23
23
|
|
24
24
|
define_method "#{name}" do
|
25
25
|
value = self.instance_variable_get("@#{name}")
|
26
|
-
|
27
|
-
|
26
|
+
if value.blank? && options[:default]
|
27
|
+
default = clone_attribute(options[:default])
|
28
|
+
self.instance_variable_set("@#{name}", default)
|
29
|
+
default
|
30
|
+
else
|
31
|
+
value
|
32
|
+
end
|
28
33
|
end
|
29
34
|
|
30
35
|
define_method "#{name}=" do |value|
|