<%= form_for @post, url: {action: :update} do |f| %>

Update a Post

<%= "

#{@post.errors.full_messages.first}
".html_safe if @post.errors.any? %>
<%= f.text_field :title %>
<%= f.text_field :description %>
<%= f.text_field :created_by %>

<%= link_to 'Back', posts_path %> <%= f.submit 'Update Post' %>
<% end %>