diff --git a/app/mailers/mailer.rb b/app/mailers/mailer.rb index fcc2a62b1..82abbb205 100644 --- a/app/mailers/mailer.rb +++ b/app/mailers/mailer.rb @@ -7,7 +7,7 @@ class Mailer < ApplicationMailer @comment = comment @commentable = comment.commentable with_user(@commentable.author) do - mail(to: @commentable.author.email, subject: t('mailers.comment.subject', commentable: t("activerecord.models.#{@commentable.class.name.downcase}", count: 1).downcase)) if @commentable.present? && @commentable.author.present? + mail(to: @commentable.author.email, subject: t('mailers.comment.subject', commentable: t("activerecord.models.#{@commentable.class.name.underscore}", count: 1).downcase)) if @commentable.present? && @commentable.author.present? end end diff --git a/config/locales/activerecord.en.yml b/config/locales/activerecord.en.yml index 2c7137b8e..fdd7e29de 100644 --- a/config/locales/activerecord.en.yml +++ b/config/locales/activerecord.en.yml @@ -67,6 +67,8 @@ en: organization: name: "Name of organisation" responsible_name: "Person responsible for the group" + spending_proposal: + administrator_id: "Administrator" errors: models: debate: @@ -76,6 +78,4 @@ en: proposal: attributes: tag_list: - less_than_or_equal_to: "tags must be less than or equal to %{count}" - spending_proposal: - administrator_id: "Administrator" + less_than_or_equal_to: "tags must be less than or equal to %{count}" \ No newline at end of file diff --git a/spec/support/common_actions.rb b/spec/support/common_actions.rb index f3669f253..5a211e5c5 100644 --- a/spec/support/common_actions.rb +++ b/spec/support/common_actions.rb @@ -63,7 +63,7 @@ module CommonActions commentable_path = commentable.is_a?(Proposal) ? proposal_path(commentable) : debate_path(commentable) visit commentable_path - fill_in "comment-body-#{commentable.class.name.downcase}_#{commentable.id}", with: 'Have you thought about...?' + fill_in "comment-body-#{commentable.class.name.underscore}_#{commentable.id}", with: 'Have you thought about...?' click_button 'Publish comment' expect(page).to have_content 'Have you thought about...?'