Permalink
Browse files

add missing new files for logged_exceptions xml support

git-svn-id: http://svn.techno-weenie.net/projects/plugins/exception_logger@2086 567b1171-46fb-0310-a4c9-b4bef9110e78
  • Loading branch information...
technoweenie
technoweenie committed Sep 6, 2006
1 parent e2d703c commit cec06216d1804a19d2b756df775fcafb85a147d0
Showing with 28 additions and 0 deletions.
  1. +8 −0 views/logged_exceptions/_feed.rhtml
  2. +20 −0 views/logged_exceptions/query.rxml
@@ -0,0 +1,8 @@
+<%
+ feed_params = [:id, :query, :date_ranges_filter, :exception_names_filter, :controller_actions_filter].inject({:format => 'rss'}) do |p, key|
+ params[key].blank? ? p : p.update(key => params[key])
+ end
+-%>
+<ul id="feed" class="filters">
+ <li><%= link_to 'Rss Feed', feed_params %></li>
+</ul>
@@ -0,0 +1,20 @@
+xml.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8"
+
+xml.rss "version" => "2.0" do
+ xml.channel do
+ xml.title "Recent Exceptions#{%( (filtered)) if filtered?} | #{LoggedExceptionsController.application_name}"
+ xml.link url_for(:only_path => false, :skip_relative_url_root => false)
+ xml.language "en-us"
+ xml.ttl "60"
+
+ @exceptions.each do |exc|
+ xml.item do
+ xml.title "#{exc.exception_class} in #{exc.controller_action} @ #{exc.created_at.rfc822}"
+ xml.description exc.message
+ xml.pubDate exc.created_at.rfc822
+ xml.guid [request.host_with_port, 'exceptions', exc.id.to_s].join(":"), "isPermaLink" => "false"
+ xml.link url_for(:action => 'index', :id => exc, :only_path => false, :skip_relative_url_root => false)
+ end
+ end
+ end
+end

0 comments on commit cec0621

Please sign in to comment.