Fix errors saving recent tags not displaying correctly
This commit is contained in:
@@ -2,7 +2,6 @@ class PostsController < ApplicationController
|
|||||||
before_filter :member_only, :except => [:show, :show_seq, :index, :home, :random]
|
before_filter :member_only, :except => [:show, :show_seq, :index, :home, :random]
|
||||||
before_filter :builder_only, :only => [:copy_notes]
|
before_filter :builder_only, :only => [:copy_notes]
|
||||||
before_filter :enable_cors, :only => [:index, :show]
|
before_filter :enable_cors, :only => [:index, :show]
|
||||||
after_filter :save_recent_tags, :only => [:update]
|
|
||||||
respond_to :html, :xml, :json
|
respond_to :html, :xml, :json
|
||||||
rescue_from PostSets::SearchError, :with => :rescue_exception
|
rescue_from PostSets::SearchError, :with => :rescue_exception
|
||||||
rescue_from Post::SearchError, :with => :rescue_exception
|
rescue_from Post::SearchError, :with => :rescue_exception
|
||||||
@@ -54,6 +53,7 @@ class PostsController < ApplicationController
|
|||||||
@post.update_attributes(params[:post], :as => CurrentUser.role)
|
@post.update_attributes(params[:post], :as => CurrentUser.role)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
save_recent_tags
|
||||||
respond_with_post_after_update(@post)
|
respond_with_post_after_update(@post)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
class UploadsController < ApplicationController
|
class UploadsController < ApplicationController
|
||||||
before_filter :member_only
|
before_filter :member_only
|
||||||
after_filter :save_recent_tags, :only => [:create]
|
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
rescue_from Upload::Error, :with => :rescue_exception
|
rescue_from Upload::Error, :with => :rescue_exception
|
||||||
|
|
||||||
@@ -62,6 +61,7 @@ class UploadsController < ApplicationController
|
|||||||
def create
|
def create
|
||||||
@upload = Upload.create(params[:upload].merge(:server => Socket.gethostname))
|
@upload = Upload.create(params[:upload].merge(:server => Socket.gethostname))
|
||||||
@upload.process! if @upload.errors.empty?
|
@upload.process! if @upload.errors.empty?
|
||||||
|
save_recent_tags
|
||||||
respond_with(@upload)
|
respond_with(@upload)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user