<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,18 +1,15 @@
 module HTTPStatus
-
-  # The HTTPStatus::Base class is used as the base exception class for every status exception.
-  # This base class itself is a subclass of StandardError.
+  
   class Base &lt; StandardError
 
     # The path from which the error documents are loaded.
     cattr_accessor :template_path
     @@template_path = 'shared/http_status'
 
-    # The status (as symbol)
-    attr_reader :status
-    
-    # Any information that is given to the constructor as second argument
-    attr_reader :details
+    # The layout in which the error documents are rendered
+    cattr_accessor :template_layout
+
+    attr_reader :status, :details
     
     # Creates the exception with a message and some optional other info.
     def initialize(message = nil, details = nil)
@@ -32,7 +29,7 @@ module HTTPStatus
     end
   end
 
-  # Creates all the exception classes based on Rails's list of available status codes and
+  # Creates all the exception classes based on Rails's list of available status code and
   # registers the exception handler using the rescue_from method.
   def self.included(base)
     ActionController::StatusCodes::STATUS_CODES.each do |code, name|
@@ -47,10 +44,12 @@ module HTTPStatus
   # with the HTTP status correspodning to the exception.
   def http_status_exception(exception)
     @exception = exception
-    render(:template =&gt; exception.template, :status =&gt; exception.status)
+    render_options = {:template =&gt; exception.template, :status =&gt; exception.status}
+    render_options[:layout] = exception.template_layout if exception.template_layout
+    render(render_options)
   rescue ActionView::MissingTemplate
     head(exception.status)
   end
 end
 
-ActionController::Base.send(:include, HTTPStatus)
+ActionController::Base.send(:include, HTTPStatus)
\ No newline at end of file</diff>
      <filename>lib/http_status_exceptions.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>02bda4c9c042f674e7fae4353a278ab716d1eaf2</id>
    </parent>
  </parents>
  <author>
    <name>James Bebbington</name>
    <email>james.bebbington@gmail.com</email>
  </author>
  <url>http://github.com/wvanbergen/http_status_exceptions/commit/5e9991342a475c899cba33e233485d52cf5662e5</url>
  <id>5e9991342a475c899cba33e233485d52cf5662e5</id>
  <committed-date>2009-03-23T23:15:21-07:00</committed-date>
  <authored-date>2009-03-20T05:04:40-07:00</authored-date>
  <message>Extend HTTPStatus::Base to accept a :template_layout class attribute. Extend HTTPStatus#http_status_exception to render with alternate layout if specified.

Signed-off-by: Willem van Bergen &lt;willem@vanbergen.org&gt;</message>
  <tree>729fdf8c24cd01bb88971388b95cdae2940203ad</tree>
  <committer>
    <name>Willem van Bergen</name>
    <email>willem@vanbergen.org</email>
  </committer>
</commit>
