Editing topic

<%= form_for(@topic) do |f| %> <%= f.error_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' %>

<% end %>
<%= link_to 'Back', @topic %>