app/models/concerns/agilibox/default_values_concern.rb in agilibox-1.3.5 vs app/models/concerns/agilibox/default_values_concern.rb in agilibox-1.3.6
- old
+ new
@@ -7,8 +7,8 @@
def assign_default(attribute, value)
send("#{attribute}=", value) if send(attribute).nil?
end
included do
- after_initialize :assign_default_values
+ after_initialize :assign_default_values, if: :new_record?
end
end