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