2014-04-20 01:29:52 +00:00
|
|
|
<h1>Editing Topic</h1>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-20 01:29:52 +00:00
|
|
|
<%= form_for(@topic, html: { class: 'square' }) do |f| %>
|
|
|
|
<%= render 'shared/errors', messages: @topic.errors.full_messages %>
|
2014-03-23 00:22:25 +00:00
|
|
|
|
2014-04-20 01:29:52 +00:00
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :title %>
|
|
|
|
<%= f.text_field :title %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :forum_id %>
|
|
|
|
<%= f.select :forum_id, Forum.all.collect{|forum| [forum, forum.id]} %>
|
|
|
|
</div>
|
|
|
|
<div class="fields horizontal">
|
|
|
|
<%= f.label :state %>
|
|
|
|
<%= f.select :state, f.object.states.invert %>
|
|
|
|
</div>
|
|
|
|
<div class="controls">
|
|
|
|
<%= f.submit 'Update Topic' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|