app/controllers/blog/admin/posts_controller.rb
## Preview a post without saving.
Preview a post without saving.
Preview a post without saving .
def preview
    @post = Blog::Post.new post_params
    @post.user_id = current_user.id
    @post.published_at = Time.zone.now
    render '/blog/posts/show', layout: Blog::Config.layout || '/layouts/blog/application'
  end
def preview @post = Blog :: Post . new post_params @post . user_id = current_user . id @post . published_at = Time . zone . now render '/blog/posts/show' , layout : Blog :: Config . layout || '/layouts/blog/application' end
Preview a post without saving.
Preview a post without saving .
# mockup our models for preview. # render it exactly as it would display when live.