Merge pull request #2748 from evazion/fix-note-saving
Fix notes appearing unsaved after saving them (fix #2747)
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
class NotesController < ApplicationController
|
class NotesController < ApplicationController
|
||||||
respond_to :html, :xml, :json, :js
|
respond_to :html, :xml, :json, :js
|
||||||
before_filter :member_only, :except => [:index, :show]
|
before_filter :member_only, :except => [:index, :show]
|
||||||
before_filter :pass_html_id, :only => [:create]
|
|
||||||
|
|
||||||
def search
|
def search
|
||||||
end
|
end
|
||||||
@@ -65,13 +64,7 @@ private
|
|||||||
end
|
end
|
||||||
|
|
||||||
def create_params
|
def create_params
|
||||||
params.require(:note).permit(:x, :y, :width, :height, :body, :post_id)
|
params.require(:note).permit(:x, :y, :width, :height, :body, :post_id, :html_id)
|
||||||
end
|
|
||||||
|
|
||||||
def pass_html_id
|
|
||||||
if params[:note] && params[:note][:html_id]
|
|
||||||
response.headers["X-Html-Id"] = params[:note][:html_id]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def index_by_post
|
def index_by_post
|
||||||
|
|||||||
Reference in New Issue
Block a user