From 2a0279d66976537a6a815b1080b30574217912f4 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 20 Jul 2018 13:41:59 -0300 Subject: [PATCH] get_front_matter no acepta simbolos --- app/views/posts/_form.haml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/posts/_form.haml b/app/views/posts/_form.haml index 327f3493..8a5a483e 100644 --- a/app/views/posts/_form.haml +++ b/app/views/posts/_form.haml @@ -5,7 +5,7 @@ %li= error -# TODO seleccionar la dirección por defecto según el idioma actual -- direction = @post.get_front_matter(:dir) || 'ltr' +- direction = @post.get_front_matter('dir') || 'ltr' -# string para configurar la clase con direccion de texto - field_class = "form-control #{direction}" -# TODO habilitar form_for @@ -64,13 +64,13 @@ %small.text-muted.form-text= t('posts.slug_help') .form-group = label_tag 'post_permalink', t('posts.permalink') - = text_field 'post', 'permalink', value: @post.get_front_matter(:permalink), + = text_field 'post', 'permalink', value: @post.get_front_matter('permalink'), class: 'form-control' %small.text-muted.form-text= t('posts.permalink_help') .form-group = label_tag 'post_layout', t('posts.layout') = select_tag 'post[layout]', - options_for_select(@site.layouts, @post.get_front_matter(:layout)), + options_for_select(@site.layouts, @post.get_front_matter('layout')), { class: 'form-control select2' } %small.text-muted.form-text= t('posts.layout_help') - if @site.i18n? @@ -80,7 +80,7 @@ = label_tag 'post_lang', t("posts.lang.#{lang}") = select_tag "post[lang][#{lang}]", options_for_select(@site.posts_for(lang).map { |p| [p.title, p.id] }, - @post.get_front_matter(:lang).try(:dig, lang)), + @post.get_front_matter('lang').try(:dig, lang)), { class: 'form-control select2' } %small.text-muted.form-text= t('posts.lang_help') -# Genera todos los campos de la plantilla