- <% Site.first.in_use_locales.each_with_index do |locale, i| %>
+ <% @site_in_use_locales.each_with_index do |locale, i| %>
">
diff --git a/app/views/admin/announcements/_form_file.html.erb b/app/views/admin/announcements/_form_file.html.erb
index 2bad106..8628623 100644
--- a/app/views/admin/announcements/_form_file.html.erb
+++ b/app/views/admin/announcements/_form_file.html.erb
@@ -21,7 +21,7 @@
- <% Site.first.in_use_locales.each_with_index do |locale, i| %>
+ <% @site_in_use_locales.each_with_index do |locale, i| %>
<%= locale %>">
<%= f.fields_for :title_translations do |f| %>
<%= f.text_field locale, :class => "input-medium", placeholder: t(:alternative), :value => (form_file.title_translations[locale] rescue nil) %>
@@ -31,7 +31,7 @@
- <% Site.first.in_use_locales.each_with_index do |locale, i| %>
+ <% @site_in_use_locales.each_with_index do |locale, i| %>
<%= locale %>">
<%= f.fields_for :description_translations do |f| %>
<%= f.text_field locale, :class => "input-medium", placeholder: t(:description), :value => (form_file.description_translations[locale] rescue nil) %>
diff --git a/app/views/admin/announcements/_form_link.html.erb b/app/views/admin/announcements/_form_link.html.erb
index 2e04304..461a3fc 100644
--- a/app/views/admin/announcements/_form_link.html.erb
+++ b/app/views/admin/announcements/_form_link.html.erb
@@ -3,7 +3,7 @@
<%= f.text_field :url, class: "input-large", placeholder: t(:url) %>
- <% Site.first.in_use_locales.each_with_index do |locale, i| %>
+ <% @site_in_use_locales.each_with_index do |locale, i| %>
<%= locale %>">
<%= f.fields_for :title_translations do |f| %>
<%= f.text_field locale, :class => "input-large", placeholder: t(:url_alt), :value => (form_link.title_translations[locale] rescue nil) %>