%= form_for :post, :url => { :action => :update, :id => @post.id }, :method => :put do |f| %> <% if @post.errors.any? %>
<%= f.label :title %>
<%= f.text_field :title %>
<%= f.label :text %>
<%= f.text_area :text %>
<%= f.submit %>
<% end %>