Skip to content

Commit

Permalink
🥔✨ Journal: Sprout Terms#show
Browse files Browse the repository at this point in the history
  • Loading branch information
zspencer committed Jul 13, 2023
1 parent 06d3df7 commit 8cf15c0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/furniture/journal/routes.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions app/furniture/journal/terms/show.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<%= term.canonical_keyword %>
<%= term.aliases %>
8 changes: 8 additions & 0 deletions spec/furniture/journal/terms_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class Journal
class TermsController < Controller
expose(:term, scope: -> { policy_scope(journal.terms) })
def show
authorize(term)
end
end
end

0 comments on commit 8cf15c0

Please sign in to comment.