From 00688ef5f24da0d4c6246360fee8ffff1a9ffd13 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Tue, 20 Oct 2015 10:14:31 +0300 Subject: [PATCH] Export multilingual hall names --- app/views/api/halls/index.jbuilder | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/api/halls/index.jbuilder b/app/views/api/halls/index.jbuilder index b57e36d..9902852 100644 --- a/app/views/api/halls/index.jbuilder +++ b/app/views/api/halls/index.jbuilder @@ -1,5 +1,9 @@ @halls.each do |hall| json.set! hall.id do - json.extract! hall, :name + json.name do + hall.translations.each do |translation| + json.set! translation.locale, translation.name + end + end end end