%= form_for(@ad_image, url: {action: "create"}) do |f| %> <% I18n.available_locales.each do |locale| %> Title <%= locale.to_s %>: <%= f.fields_for :title_translations do |n| %> <%= n.text_field locale %> <% end %> Context <%= locale.to_s %>: <%= f.fields_for :context_translations do |n| %> <%= n.text_area locale %> <% end %> <% end %>
<%= image_tag(@ad_image.file_url) if @ad_image.file? %> <%= f.file_field :file %> <%= f.hidden_field :file_cache %>
<%= f.select :banner_id, @ad_banners.collect{|t| [ t.title, t.id ]} %> <%= f.submit "Create Banner Image" %> <% end %>