From 9e1bf6e6d8d0ee9390dcc579f4f69b76740b14f0 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sun, 30 Apr 2023 18:49:04 +1000 Subject: [PATCH] Fix tags index page --- app/decorators/bookmarks/decorator.rb | 4 ++++ app/views/tags/show.rb | 4 +++- lib/adamantium/middleware/basic_auth.rb | 0 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 lib/adamantium/middleware/basic_auth.rb diff --git a/app/decorators/bookmarks/decorator.rb b/app/decorators/bookmarks/decorator.rb index 2938c07..612b2df 100644 --- a/app/decorators/bookmarks/decorator.rb +++ b/app/decorators/bookmarks/decorator.rb @@ -18,6 +18,10 @@ module Adamantium !syndication_sources.empty? end + def template_type + :bookmark + end + def syndicated_to syndication_sources.map do |source, url| { diff --git a/app/views/tags/show.rb b/app/views/tags/show.rb index f311438..d234c25 100644 --- a/app/views/tags/show.rb +++ b/app/views/tags/show.rb @@ -9,7 +9,9 @@ module Adamantium expose :posts do |slug:| post_tag_repo.posts_tagged(tag: slug).map do |post| - Decorators::Posts::Decorator.new(post) + post.url ? + Decorators::Bookmarks::Decorator.new(post) : + Decorators::Posts::Decorator.new(post) end end diff --git a/lib/adamantium/middleware/basic_auth.rb b/lib/adamantium/middleware/basic_auth.rb new file mode 100644 index 0000000..e69de29