annotates legislations instead of proposals
This commit is contained in:
@@ -23,7 +23,7 @@ class AnnotationsController < ApplicationController
|
||||
end
|
||||
|
||||
def search
|
||||
@annotations = Annotation.where(proposal_id: params[:proposal_id])
|
||||
@annotations = Annotation.where(legislation_id: params[:legislation_id])
|
||||
annotations_hash = { total: @annotations.size, rows: @annotations }
|
||||
render json: annotations_hash.to_json
|
||||
end
|
||||
@@ -34,6 +34,6 @@ class AnnotationsController < ApplicationController
|
||||
params
|
||||
.require(:annotation)
|
||||
.permit(:quote, :text, ranges: [:start, :startOffset, :end, :endOffset])
|
||||
.merge(proposal_id: params[:proposal_id], user_id: params[:user_id])
|
||||
.merge(legislation_id: params[:legislation_id], user_id: params[:user_id])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user