在 rails 3.0.9(可能更早)中,此代码不再有效:
//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
确切的错误是:ArgumentError: wrong number of arguments (1 for 2)
堆栈跟踪:
/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'
…
这对我来说很重要,并按照此处所述设置超级馈送器 Pubsubhubbub 。我需要<link rel="hub" … >
在 atom 提要中添加一个标签,但feed.link
由于该方法已从atom_feed_helper.rb
. 我怎样才能让这个链接标签再次出现?