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

Update Post

<%= "

#{@post.errors.full_messages.first}
".html_safe if @post.errors.any? %>
<%= f.text_field :title, class: "form-control", name: "title" %>
<%= f.text_area :description, class: "form-control", rows: "5", cols: "10", style: "resize:none;", name: 'description' %>
<%= f.text_field :created_by, class: "form-control", name: "created_by" %>

<%= link_to 'Back', posts_path, class: "btn btn-info" %>
<%= f.submit 'Update Post', class: "btn btn-success" %>
<% end %>