removes problematic html_safe link from flash notice
No need for it now that investments are public
This commit is contained in:
@@ -46,13 +46,9 @@ module Budgets
|
|||||||
@investment.author = current_user
|
@investment.author = current_user
|
||||||
|
|
||||||
if @investment.save
|
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),
|
redirect_to budget_investment_path(@budget, @investment),
|
||||||
flash: { html_safe: true },
|
notice: t('flash.actions.create.budget_investment')
|
||||||
notice: t('flash.actions.create.budget_investment', activity: activity_link)
|
|
||||||
else
|
else
|
||||||
|
|
||||||
render :new
|
render :new
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ en:
|
|||||||
proposal: "Proposal created successfully."
|
proposal: "Proposal created successfully."
|
||||||
proposal_notification: "Your message has been sent correctly."
|
proposal_notification: "Your message has been sent correctly."
|
||||||
spending_proposal: "Spending proposal created successfully. You can access it from %{activity}"
|
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"
|
signature_sheet: "Signature sheet created successfully"
|
||||||
save_changes:
|
save_changes:
|
||||||
notice: Changes saved
|
notice: Changes saved
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ es:
|
|||||||
proposal: "Propuesta creada correctamente."
|
proposal: "Propuesta creada correctamente."
|
||||||
proposal_notification: "Tu message ha sido enviado correctamente."
|
proposal_notification: "Tu message ha sido enviado correctamente."
|
||||||
spending_proposal: "Propuesta de inversión creada correctamente. Puedes acceder a ella desde %{activity}"
|
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"
|
signature_sheet: "Hoja de firmas creada correctamente"
|
||||||
save_changes:
|
save_changes:
|
||||||
notice: Cambios guardados
|
notice: Cambios guardados
|
||||||
|
|||||||
@@ -190,13 +190,8 @@ feature 'Budget Investments' do
|
|||||||
click_button 'Create Investment'
|
click_button 'Create Investment'
|
||||||
|
|
||||||
expect(page).to have_content 'Investment created successfully'
|
expect(page).to have_content 'Investment created successfully'
|
||||||
expect(page).to have_content 'You can access it from My activity'
|
|
||||||
|
|
||||||
within "#notice" do
|
visit user_url(author, filter: :budget_investments)
|
||||||
click_link 'My activity'
|
|
||||||
end
|
|
||||||
|
|
||||||
expect(current_url).to eq(user_url(author, filter: :budget_investments))
|
|
||||||
expect(page).to have_content "1 Investment"
|
expect(page).to have_content "1 Investment"
|
||||||
expect(page).to have_content "Build a skyscraper"
|
expect(page).to have_content "Build a skyscraper"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user