- unless post.errors.empty? .alert.alert-danger %ul - post.errors.each do |key, error| %li %strong = key.capitalize = [error].flatten.join("\n") -# TODO: habilitar form_for :ruby if post.new? url = site_posts_path(site) method = :post else url = site_post_path(site, post) method = :patch end -# Comienza el formulario = form_tag url, method: method, class: 'form post', multipart: true do -# Botones de guardado = render 'posts/submit', site: site -# Dibuja cada atributo - post.attributes.each do |attribute| - metadata = post.send(attribute) - type = metadata.type = render "posts/attributes/#{type}", post: post, attribute: attribute, metadata: metadata -# Botones de guardado = render 'posts/submit', site: site