permitir guardar artículos con campos de solo lectura

This commit is contained in:
f 2021-04-11 16:43:59 -03:00
parent b9f7dc4826
commit 6e9b333cd5

View file

@ -378,8 +378,10 @@ class Post
# Ejecuta la acción de guardado en cada atributo.
def save_attributes!
attributes.map do |attr|
self[attr].writable? && self[attr].save
attributes.select do |attr|
self[attr].writable?
end.map do |attr|
self[attr].save
end.all?
end
end