add tag seq nav

This commit is contained in:
albert
2013-02-25 12:09:02 -05:00
parent 2aa141aa69
commit c6d03f2d3a
10 changed files with 81 additions and 13 deletions

View File

@@ -27,6 +27,15 @@ class PostsController < ApplicationController
respond_with(@post)
end
def show_seq
context = PostSearchContext.new(params)
if context.post_id
redirect_to(post_path(context.post_id, :tags => params[:tags]))
else
redirect_to(post_path(params[:id], :tags => params[:tags]))
end
end
def update
@post = Post.find(params[:id])
@post.update_attributes(params[:post], :as => CurrentUser.role)