This commit is contained in:
Toks
2013-05-18 16:25:46 -04:00
parent f2c4312f9f
commit 17af05b2b1
6 changed files with 55 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
class PostsController < ApplicationController
before_filter :member_only, :except => [:show, :show_seq, :index]
before_filter :builder_only, :only => [:copy_notes]
after_filter :save_recent_tags, :only => [:update]
respond_to :html, :xml, :json
rescue_from PostSets::SearchError, :with => :rescue_exception
@@ -76,6 +77,13 @@ class PostsController < ApplicationController
end
end
def copy_notes
@post = Post.find(params[:id])
@other_post = Post.find(params[:other_post_id].to_i)
@post.copy_notes_to(@other_post)
render :nothing => true
end
private
def tag_query
params[:tags] || (params[:post] && params[:post][:tags])