app/models/blog.rb
def update_feed!
    @newest_entry = entries.order(published: :desc).first

    download_success_date = lambda { |url, feed|
      feed.entries.each do |entry|
         next unless !@newest_entry || entry.published > @newest_entry.published
         add_new_entry_from_feed(entry)
      end
    }
    Feedjira::Feed.fetch_and_parse(
      url,
      on_success: download_success_date,
      on_failure: download_failure
    )
  end
#grab each feed
#update feed articles - download_entries_after_blog_create
grab each feed
update feed articles - download_entries_after_blog_create
grab each feed update feed articles - download_entries_after_blog_create
def update_feed!
    @newest_entry = entries.order(published: :desc).first
    download_success_date = lambda { |url, feed|
      feed.entries.each do |entry|
         next unless !@newest_entry || entry.published > @newest_entry.published
         add_new_entry_from_feed(entry)
      end
    }
    Feedjira::Feed.fetch_and_parse(
      url,
      on_success: download_success_date,
      on_failure: download_failure
    )
  end
def update_feed! @newest_entry = entries . order ( published : :desc ) . first download_success_date = lambda { | url , feed | feed . entries . each do | entry | next unless ! @newest_entry || entry . published > @newest_entry . published add_new_entry_from_feed ( entry ) end } Feedjira :: Feed . fetch_and_parse ( url , on_success : download_success_date , on_failure : download_failure ) end
grab each feed
update feed articles - download_entries_after_blog_create
grab each feed update feed articles - download_entries_after_blog_create