diff --git a/app/models/post.rb b/app/models/post.rb index d0253a71..0123a80a 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -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