1

I have error when I try to load feed entries

ArgumentError (wrong number of arguments (2 for 1)):

I use feedjira 2.0, mongoid No error when using 1.6.0.

  def load_feed_entries
    last_entry = self.feed_entries.last
    if last_entry.nil?
      feed = Feedjira::Feed.fetch_and_parse(self.url)
    else
      feed = Feedjira::Feed.fetch_and_parse(self.url,
        :if_modified_since => last_entry.published_at.to_time)
    end

    Source.add_entries(feed.entries, self.id)
  end

  def self.update_all_feeds(urls)
    Feedjira::Feed.fetch_and_parse(urls,
      :on_success => lambda { |url, feed|
        rss = Source.only(:id).where(:url => url).first
        Source.add_entries(feed.entries, rss.id)
      }
    )
  end
Anton Ipatov
  • 169
  • 2
  • 14
  • 1
    as you seem to use only one function, and as you (we not) probably also know the source code line the error is in, you could probably just read the (API) documentation of feedjira 2.0 and find it there. – hoijui Jul 24 '15 at 06:05

0 Answers0