blob: ca6553958a001e7807a6e010bbf861029501667a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# frozen_string_literal: true
class SharedSearchesController < ApplicationController
skip_before_action :user_authenticated!, only: %i[show]
def index
@searches = Search.order(:name)
@saved_searches = @searches.where(shared: true)
end
def show
@search = Search.where(shared: true).find(params[:search_id])
@results = @search.results.values.flatten
end
end
|