diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2024-03-13 18:03:43 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2024-03-13 18:03:43 +0100 |
| commit | a7791635aa98f012d35f97c3c5288494bbb28e38 (patch) | |
| tree | bad987e6b4d10ad2f7cd02e40658d464907595ee /app/controllers/shared_searches_controller.rb | |
| download | operum-a7791635aa98f012d35f97c3c5288494bbb28e38.tar.gz operum-a7791635aa98f012d35f97c3c5288494bbb28e38.zip | |
Initial commit
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'app/controllers/shared_searches_controller.rb')
| -rw-r--r-- | app/controllers/shared_searches_controller.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/controllers/shared_searches_controller.rb b/app/controllers/shared_searches_controller.rb new file mode 100644 index 0000000..3208e7c --- /dev/null +++ b/app/controllers/shared_searches_controller.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class SharedSearchesController < ApplicationController + skip_before_action :user_authenticated!, only: %i[show] + + def index + @searches = Search.where(shared: true) + end + + def show + @search = Search.find(params[:search_id]) + end +end |
