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/app/furniture/journal/terms/show.html.erb b/app/furniture/journal/terms/show.html.erb new file mode 100644 index 000000000..a9de1d323 --- /dev/null +++ b/app/furniture/journal/terms/show.html.erb @@ -0,0 +1,2 @@ +<%= keyword.canonical_keyword %> +<%= keyword.aliases %> diff --git a/spec/furniture/journal/terms_controller.rb b/spec/furniture/journal/terms_controller.rb new file mode 100644 index 000000000..ce440d35e --- /dev/null +++ b/spec/furniture/journal/terms_controller.rb @@ -0,0 +1,8 @@ +class Journal + class TermsController < Controller + expose(:keyword, scope: -> { policy_scope(journal.keywords) }) + def show + authorize(keyword) + end + end +end