Posts: 76
how to display links inside my rss description?
It doesn’t look like you’re having trouble with any links… looks like
Builder doesn’t like you calling a block as an argument to a tag (via
method_missing):
xml.description item.authors.collect do |author|
link_to(author.name,:only_path => false,
:controller => 'items',
:action => 'show',
:id => item.id)
end
I think you want braces around the content (the block) being passed to
xml.description:
xml.description {
item.authors.collect do |author|
link_to(author.name,:only_path => false,
:controller => ‘items’,
:action => ‘show’,
:id => item.id)
end
}
Looks to me like you also have some typos in there, unless they’re
features of Builder of which I’m not aware… in particular there is a
‘_’ character before a ‘(’ in two places:
Looks to me like you also have some typos in there, unless they’re
features of Builder of which I’m not aware… in particular there is a
‘_’ character before a ‘(’ in two places:
xml.title _(‘My RSS’)
and
xml.description _(“feed of the day”)
this is not a typo, it’s just ruby gettext synthax
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.