announcement-test/app/views/admin/announcements/new.html.erb

15 lines
404 B
Plaintext
Raw Normal View History

2014-04-03 03:18:02 +00:00
<%= form_for @announcement, 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 %>
Body <%= locale.to_s %>:
<%= f.fields_for :body_translations do |n| %>
<%= n.text_area locale %>
<% end %>
<% end %>
<%= f.submit "Create Announcement" %>
<% end %>