end
end
- def with_format(format, &block)
- old_format = @template_format
- @template_format = format
- result = block.call
- @template_format = old_format
- return result
- end
-
private
def javascript_strings_for_key(key)
xml.wpt("lon" => note.lon, "lat" => note.lat) do
- with_format(:html) do
- xml.desc do
- xml.cdata! render(:partial => "description", :object => note, :format => :html)
- end
+ xml.desc do
+ xml.cdata! render(:partial => "description", :object => note, :formats => [ :html ])
end
xml.extension do
xml.link url_for(:controller => "browse", :action => "note", :id => note.id, :only_path => false)
xml.guid url_for(:controller => "note", :action => "read", :id => note.id, :only_path => false)
- with_format(:html) do
- xml.description render(:partial => "description", :object => note)
- end
+ xml.description render(:partial => "description", :object => note, :formats => [ :html ])
xml.author note.author_name
xml.pubDate note.updated_at.to_s(:rfc822)
xml.geo :lat, note.lat