Fixes i18n errors now that they are detected by i18n-tasks

This commit is contained in:
kikito
2017-01-06 19:55:23 +01:00
parent 9d80b56f84
commit b7a0aa3b57
15 changed files with 46 additions and 157 deletions

View File

@@ -66,14 +66,14 @@ class Valuation::BudgetInvestmentsController < Valuation::BaseController
def valid_price_params?
if /\D/.match params[:budget_investment][:price]
@investment.errors.add(:price, I18n.t('budget.investments.wrong_price_format'))
@investment.errors.add(:price, I18n.t('budgets.investments.wrong_price_format'))
end
if /\D/.match params[:budget_investment][:price_first_year]
@investment.errors.add(:price_first_year, I18n.t('budget.investments.wrong_price_format'))
@investment.errors.add(:price_first_year, I18n.t('budgets.investments.wrong_price_format'))
end
@investment.errors.empty?
end
end
end