Skip to content

Commit

Permalink
Handle nil published_at in the RSS generator, not defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
cavis committed Apr 20, 2023
1 parent e253d5e commit a659258
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion app/models/podcast.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def self.by_prx_series(series)

def set_defaults
set_default_feed
self.published_at ||= Time.now
self.explicit ||= "false"
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/podcasts/show.rss.builder
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ xml.rss "xmlns:atom" => "http://www.w3.org/2005/Atom",
xml.channel do
xml.title @feed.title || @podcast.title
xml.link @podcast.link
xml.pubDate @podcast.pub_date.utc.rfc2822
xml.pubDate @podcast.pub_date.utc.rfc2822 if @podcast.pub_date.present?
xml.lastBuildDate @podcast.last_build_date.utc.rfc2822
xml.ttl 60
xml.language @podcast.language || "en-us"
Expand Down

0 comments on commit a659258

Please sign in to comment.