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

Add 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', post_index_path %> <%= f.submit 'Create Post' %>
<% end %>