Skip to content

Commit

Permalink
Fix class method and its return value
Browse files Browse the repository at this point in the history
  • Loading branch information
radical-ube committed May 13, 2024
1 parent 178369d commit 5f2d37d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/apple/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ class Config < ApplicationRecord
delegate :public_feed, to: :podcast, allow_nil: true
alias_method :private_feed, :feed

def find_or_build_apple_feed(podcast)
existing_feed = Feed.where(podcast_id: podcast.id, type: "Feeds::AppleSubscription")
def self.find_or_build_apple_feed(podcast)
existing_feed = Feeds::AppleSubscription.find_by_podcast_id(podcast.id)
existing_feed.present? ? existing_feed : Feeds::AppleSubscription.new(podcast_id: podcast.id)
end

Expand Down

0 comments on commit 5f2d37d

Please sign in to comment.