Skip to content
Snippets Groups Projects
Commit 3ae6078e authored by Mateus Rambo Strey's avatar Mateus Rambo Strey
Browse files

fix object_type name in search

parent f9962ced
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,6 @@ class V1::SearchController < ApplicationController ...@@ -27,6 +27,6 @@ class V1::SearchController < ApplicationController
# Never trust parameters from the scary internet, only allow the white list through. # Never trust parameters from the scary internet, only allow the white list through.
def search_params def search_params
params.permit(:page, :results_per_page, :order, :query, :search_class, tags: [], subjects: [], educational_stages: [], types: []) params.permit(:page, :results_per_page, :order, :query, :search_class, tags: [], subjects: [], educational_stages: [], object_types: [])
end end
end end
class Search class Search
include ActiveModel::Model include ActiveModel::Model
attr_accessor :page, :results_per_page, :order, :query, :search_class, :tags, :subjects, :educational_stages, :types attr_accessor :page, :results_per_page, :order, :query, :search_class, :tags, :subjects, :educational_stages, :object_types
validates_presence_of :query, :results_per_page, :order, :search_class validates_presence_of :query, :results_per_page, :order, :search_class
validates_numericality_of :results_per_page, greater_than: 0 validates_numericality_of :results_per_page, greater_than: 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment