You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
631 B
33 lines
631 B
class DocumentsController < ApplicationController |
|
include JurisprudenceSearch |
|
|
|
load_and_authorize_resource :document, class: "Cdao::Jurisprudence" |
|
|
|
def index |
|
search = jurisprudence_search(search_params) |
|
|
|
@jurisprudences = search.results |
|
|
|
respond_to do |format| |
|
format.html |
|
end |
|
end |
|
|
|
def show |
|
@doctrines = @document.doctrines |
|
end |
|
|
|
def search |
|
index |
|
|
|
respond_to do |format| |
|
format.html { render :search } |
|
end |
|
end |
|
|
|
private |
|
def search_params |
|
params.permit(:reference_number, :title, :short_title, :q, :page, :per_page, |
|
:subject_ids) |
|
end |
|
end
|
|
|