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