Extending @oreoluwa's answer with a little more rails conventions:
Your post object:
class Post < ActiverRecord::Base scope :ordered, -> { order(created_at: :desc) } # or use your own column to orderend
Your Controller (where your view is where the last post should be rendered). You should not make queries in your views to keep better a better control.
class ExamplesController < ApplicationController def show @latest_post = Post.ordered.first endend
Your View
<div class="col-md-4 col-sm-6 portfolio-item"><a href="#portfolioModal6" class="portfolio-link" data-toggle="modal"><div class="portfolio-caption"><h4><%= link_to @latest_post.title, @latest_post %></h4><p class="text-muted"><%= @latest_post.created_at.strftime("%B, %d, %Y") %></p></div></a></div>