Renames Legislation model to LegacyLegislation

Renames the model and related stuff from Legislation 
to LegacyLegislation to avoid name clashes with 
the future Legislation module.
This commit is contained in:
Amaia Castro
2016-11-17 15:03:58 +01:00
parent 9e5a55be68
commit 9a9f1da5a0
17 changed files with 79 additions and 77 deletions

View File

@@ -24,7 +24,7 @@ class AnnotationsController < ApplicationController
end
def search
@annotations = Annotation.where(legislation_id: params[:legislation_id])
@annotations = Annotation.where(legacy_legislation_id: params[:legacy_legislation_id])
annotations_hash = { total: @annotations.size, rows: @annotations }
render json: annotations_hash.to_json(methods: :permissions)
end
@@ -35,6 +35,6 @@ class AnnotationsController < ApplicationController
params
.require(:annotation)
.permit(:quote, :text, ranges: [:start, :startOffset, :end, :endOffset])
.merge(legislation_id: params[:legislation_id])
.merge(legacy_legislation_id: params[:legacy_legislation_id])
end
end