This commit is contained in:
r888888888
2013-10-07 17:59:43 -07:00
parent ab7f97c5ae
commit 892d62fac3
2 changed files with 7 additions and 4 deletions

View File

@@ -9,6 +9,7 @@ class PostsController < ApplicationController
rescue_from ActiveRecord::RecordNotFound, :with => :rescue_exception
def index
flash[:notice] = "test 1 2 3"
if params[:md5].present?
@post = Post.find_by_md5(params[:md5])
redirect_to post_path(@post)