From 6b03f71e539b4de0017e3a20946b255b38e13c9c Mon Sep 17 00:00:00 2001 From: f Date: Tue, 26 May 2020 19:02:52 -0300 Subject: [PATCH] fixes --- app/helpers/application_helper.rb | 4 +--- app/views/posts/_form.haml | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 23ba2ae7..fe1a05e2 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -82,9 +82,7 @@ module ApplicationHelper def post_label_t(*attribute, post:) label = post_t(*attribute, post: post, type: :label) - if post.send(attribute.first).required - label += I18n.t('posts.attributes.required.label') - end + label += I18n.t('posts.attributes.required.label') if post.send(attribute.first).required label end diff --git a/app/views/posts/_form.haml b/app/views/posts/_form.haml index da34a8dc..12e814dc 100644 --- a/app/views/posts/_form.haml +++ b/app/views/posts/_form.haml @@ -6,10 +6,10 @@ -# TODO: habilitar form_for :ruby if post.new? - url = site_posts_path(site) + url = site_posts_path(site, locale: @locale) method = :post else - url = site_post_path(site, post.id) + url = site_post_path(site, post.id, locale: @locale) method = :patch end