diff --git a/app/helpers/comments_helper.rb b/app/helpers/comments_helper.rb new file mode 100644 index 000000000..8e8aae90c --- /dev/null +++ b/app/helpers/comments_helper.rb @@ -0,0 +1,11 @@ +module CommentsHelper + + def comment_link_text(parent) + parent.class == Debate ? "Comentar" : "Responder" + end + + def comment_button_text(parent) + parent.class == Debate ? "Publicar comentario" : "Publicar respuesta" + end + +end \ No newline at end of file diff --git a/app/views/comments/_form.html.erb b/app/views/comments/_form.html.erb index fbe743f88..d8315688a 100644 --- a/app/views/comments/_form.html.erb +++ b/app/views/comments/_form.html.erb @@ -1,4 +1,4 @@ -<%= link_to "Comentar", "", class: "js-add-comment-link", data: {'id': parent.id} %> +<%= link_to comment_link_text(parent), "", class: "js-add-comment-link", data: {'id': parent.id} %>
\ No newline at end of file