pipeline_dealers 0.0.4 → 0.0.5
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.
@@ -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)
|