From 64d65269d8ed043dd5b9e3148f1b237ae766b475 Mon Sep 17 00:00:00 2001 From: Thorsten Claus Date: Sun, 18 Apr 2021 13:25:50 +0200 Subject: [PATCH] Fixing robocop --- app/models/post.rb | 2 +- lib/stream/local_public.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/post.rb b/app/models/post.rb index 211972931..e8abc75ff 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -52,7 +52,7 @@ class Post < ApplicationRecord scope :all_public, -> { where(public: true) } scope :all_local_public, -> { - where(" exists ( + where(" exists ( select 1 from people where posts.author_id = people.id and people.pod_id is null) and posts.public = true") diff --git a/lib/stream/local_public.rb b/lib/stream/local_public.rb index 9e0963cee..bb25f359b 100644 --- a/lib/stream/local_public.rb +++ b/lib/stream/local_public.rb @@ -7,7 +7,7 @@ class Stream::LocalPublic < Stream::Base end def title - I18n.translate("streams.local_public.title") + I18n.t("streams.local_public.title") end # @return [ActiveRecord::Association] AR association of posts