app/controllers/almanac/posts_controller.rb in almanac-0.5.0 vs app/controllers/almanac/posts_controller.rb in almanac-0.5.1

- old
+ new

@@ -40,9 +40,14 @@ end end def show @post = Post.find_by_slug(params[:slug]) + if @post.nil? and not params[:slug].empty? + redirect_to edit_post_path(params[:slug]), :notice => "Your post has to have a slug." + return + end + if @post.published @comments = @post.comments.where(:spam => false) end respond_with(@post) do |format|