pipeline_dealers 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -85,7 +85,9 @@ module PipelineDealers
|
|
85
85
|
IGNORE_ATTRIBUTES_WHEN_SAVING = [:updated_at, :created_at]
|
86
86
|
def save_attrs
|
87
87
|
# Ignore some attributes
|
88
|
-
save_attrs = @attributes.reject
|
88
|
+
save_attrs = @attributes.reject do |name, value|
|
89
|
+
IGNORE_ATTRIBUTES_WHEN_SAVING.member?(name) || self.class.attributes[name.to_sym][:read_only] == true
|
90
|
+
end
|
89
91
|
|
90
92
|
# And allow a model class to modify / edit attributes even further
|
91
93
|
if respond_to?(:attributes_for_saving)
|