Add remote translations to budget investments

This commit is contained in:
taitus
2019-01-25 17:41:58 +01:00
committed by voodoorai2000
parent c1f3a4ad3b
commit b3ae9038c3
2 changed files with 11 additions and 0 deletions

View File

@@ -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

View File

@@ -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