removes problematic html_safe link from flash notice

No need for it now that investments are public
This commit is contained in:
Juanjo Bazán
2017-01-09 18:16:59 +01:00
parent e60a56ea8f
commit a5338a4455
4 changed files with 4 additions and 13 deletions

View File

@@ -46,13 +46,9 @@ module Budgets
@investment.author = current_user
if @investment.save
activity_link = view_context.link_to(t('layouts.header.my_activity_link'),
user_path(current_user, filter: :budget_investments))
redirect_to budget_investment_path(@budget, @investment),
flash: { html_safe: true },
notice: t('flash.actions.create.budget_investment', activity: activity_link)
notice: t('flash.actions.create.budget_investment')
else
render :new
end
end

View File

@@ -9,7 +9,7 @@ en:
proposal: "Proposal created successfully."
proposal_notification: "Your message has been sent correctly."
spending_proposal: "Spending proposal created successfully. You can access it from %{activity}"
budget_investment: "Budget Investment created successfully. You can access it from %{activity}"
budget_investment: "Budget Investment created successfully."
signature_sheet: "Signature sheet created successfully"
save_changes:
notice: Changes saved

View File

@@ -9,7 +9,7 @@ es:
proposal: "Propuesta creada correctamente."
proposal_notification: "Tu message ha sido enviado correctamente."
spending_proposal: "Propuesta de inversión creada correctamente. Puedes acceder a ella desde %{activity}"
budget_investment: "Inversión creada correctamente. Puedes verla desde %{activity}"
budget_investment: "Propuesta de inversión creada correctamente."
signature_sheet: "Hoja de firmas creada correctamente"
save_changes:
notice: Cambios guardados

View File

@@ -190,13 +190,8 @@ feature 'Budget Investments' do
click_button 'Create Investment'
expect(page).to have_content 'Investment created successfully'
expect(page).to have_content 'You can access it from My activity'
within "#notice" do
click_link 'My activity'
end
expect(current_url).to eq(user_url(author, filter: :budget_investments))
visit user_url(author, filter: :budget_investments)
expect(page).to have_content "1 Investment"
expect(page).to have_content "Build a skyscraper"
end