5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 01:21:42 +00:00
This commit is contained in:
f 2020-05-26 19:02:52 -03:00
parent 44fb1c1ffc
commit 6b03f71e53
2 changed files with 3 additions and 5 deletions

View file

@ -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

View file

@ -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