diff --git a/app/furniture/journal/keywords/show.html.erb b/app/furniture/journal/keywords/show.html.erb new file mode 100644 index 000000000..a9de1d323 --- /dev/null +++ b/app/furniture/journal/keywords/show.html.erb @@ -0,0 +1,2 @@ +<%= keyword.canonical_keyword %> +<%= keyword.aliases %> diff --git a/app/furniture/journal/routes.rb b/app/furniture/journal/routes.rb index ab0e5a911..008cc0fd0 100644 --- a/app/furniture/journal/routes.rb +++ b/app/furniture/journal/routes.rb @@ -1,8 +1,9 @@ class Journal class Routes def self.append_routes(router) - router.resources :journals do - router.resources :entries, module: "journal" + router.resources :journals, module: "journal" do + router.resources :entries + router.resources :keywords, only: [:show] end end end diff --git a/spec/furniture/journal/keywords_controller.rb b/spec/furniture/journal/keywords_controller.rb new file mode 100644 index 000000000..2792f7c7d --- /dev/null +++ b/spec/furniture/journal/keywords_controller.rb @@ -0,0 +1,8 @@ +class Journal + class KeywordsController < Controller + expose(:keyword, scope: -> { policy_scope(journal.keywords) }) + def show + authorize(keyword) + end + end +end