0

In rails 3.0.9 (and maybe earlier) this code no longer works:

//feed.atom.builder
atom_feed :language => 'en-US' do |feed|
  feed.title @title
  feed.updated @updated
  feed.link('href' => 'http://[REDACTED].superfeedr.com/', 'rel' => "hub")
  ...
end

The exact error is: ArgumentError: wrong number of arguments (1 for 2) with a stack trace of:

/Users/[REDACTED]/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/fileutils.rb:302:in `ln'
[GEM_ROOT]@global/gems/rake-0.8.7/lib/rake.rb:1094:in `link'
[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_view/helpers/atom_feed_helper.rb:146:in `method_missing'
app/views/feeds/index.atom.builder:4:in `block in _app_views_feeds_index_atom_builder___2426096422608134746_70129604713820_3077995114801777171'
[GEM_ROOT]/gems/actionpack-3.0.9/lib/action_view/helpers/atom_feed_helper.rb:123:in `block in atom_feed'
…

This is important for me and to setup a superfeedr Pubsubhubbub as described here. I need to get a <link rel="hub" … > tag into the atom feed but feed.link no longer works like it used to due to the method being removed from atom_feed_helper.rb. How can I get this link tag to show up again?

1 Answer 1

0

I believe you used this gem which seems a bit old, and since Atom is just a flavor of XML, it may be easier to just write the feed yourself anyway, using the answer given there.

2
  • That gem has been integrated into rails. I am not using any external gem for atom rendering.
    – coneybeare
    Sep 21, 2011 at 20:57
  • I did switch to XML straight though and got it to work. Curious why rails would remove it from the atom builder though
    – coneybeare
    Sep 21, 2011 at 21:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.