Editing Topic

<%= form_for(@topic, html: { class: 'square' }) do |f| %> <%= render 'shared/errors', messages: @topic.errors.full_messages %>
<%= f.label :title %> <%= f.text_field :title %>
<%= f.label :forum_id %> <%= f.select :forum_id, Forum.all.collect{|forum| [forum, forum.id]} %>
<%= f.label :state %> <%= f.select :state, f.object.states.invert %>
<%= f.submit 'Update Topic' %>
<% end %>