diff --git a/app/controllers/budgets/investments_controller.rb b/app/controllers/budgets/investments_controller.rb index d5728e254..5a57dd1f4 100644 --- a/app/controllers/budgets/investments_controller.rb +++ b/app/controllers/budgets/investments_controller.rb @@ -49,6 +49,7 @@ module Budgets load_investment_votes(@investments) @tag_cloud = tag_cloud + @remote_translations = detect_remote_translations(@investments) end def new @@ -61,6 +62,7 @@ module Budgets set_comment_flags(@comment_tree.comments) load_investment_votes(@investment) @investment_ids = [@investment.id] + @remote_translations = detect_remote_translations([@investment], @comment_tree.comments) end def create diff --git a/spec/features/budgets/investments_spec.rb b/spec/features/budgets/investments_spec.rb index 2e136e041..e61b9e056 100644 --- a/spec/features/budgets/investments_spec.rb +++ b/spec/features/budgets/investments_spec.rb @@ -29,6 +29,15 @@ describe "Budget Investments" do "new_budget_investment_path", %w[title], { "description" => :ckeditor } + it_behaves_like "remotely_translatable", + :budget_investment, + "budget_investments_path", + { "budget_id": "budget_id" } + + it_behaves_like "remotely_translatable", + :budget_investment, + "budget_investment_path", + { "budget_id": "budget_id", "id": "id" } end context "Load" do