I know this is weird and you might not believe me but I have confirmed this Rails version 1.1.6.
I have an .rxml view file that produces RSS. In this file is a call to xml.title(@feed_title) which in normal cases creates Some cool rss feed . However, after awhile I start seeing this error:
ActionView::TemplateError (wrong number of arguments (1 for 0)) on line #6 of app/views/autonomy/query/rss.rxml: 3: xml.rss “version” => “2.0”,“xmlns:dc” => "[
DCMI: DCMI Metadata Terms](DCMI: DCMI Metadata Terms)" do 4: xml.channel do 5: logger.error(“FOOOOOO” + xml.title.to_s) 6: xml.title @feed_title
After some digging I have discovered that the methods that in ApplicationHelper have been magically added to the xml builder object. This happens when I call a separate controller which does an ‘include ApplicationHelper’ in it. Thoughts?
logger output Rendering autonomy/query/rss FOOOOOOCollective Intellect, Inc.
File: Excerpt: ApplicationHelper
#############################################################################
Some layouts require a title method.
def title @title || “Collective Intellect, Inc.” end
File Excerpt: EmailReportController
require ‘ostruct’ require ‘analysis/email_report_helper’ include ApplicationHelper
include GruffHelper include Analysis::EmailReportHelper
require ‘base64’
File: rss.rxml xml.instruct!
xml.rss “version” => “2.0”,“xmlns:dc” => " http://purl.org/dc/elements/1.1" do xml.channel do xml.title @feed_title xml.link url_for(:only_path => false) xml.pubDate CGI.rfc1123_date(Time.now) xml.description h(@description)
@results.each do |result| xml.item do xml.title result.title + "( #{result.weight} )" xml.link result.reference xml.description result.message xml.pubDate CGI.rfc1123_date(Time.parse(result.date)) xml.guid result.reference xml.author result.author xml.summary result.summary xml.relevance result.weight end end
end
end