64 lines
2.1 KiB
Plaintext
64 lines
2.1 KiB
Plaintext
<div id="container">
|
|
<div id="header-container">
|
|
<img src="/images/merb.jpg" />
|
|
<!-- <h1>Mongrel + Erb</h1> -->
|
|
<h2>pocket rocket web framework</h2>
|
|
<hr />
|
|
</div>
|
|
|
|
<div id="left-container">
|
|
<h3>Exception:</h3>
|
|
<p><%= params[:exception] %></p>
|
|
</div>
|
|
|
|
<div id="main-container">
|
|
<h3>Why am I seeing this page?</h3>
|
|
<p>Merb couldn't find an appropriate content_type to return,
|
|
based on what you said was available via provides() and
|
|
what the client requested.</p>
|
|
|
|
<h3>How to add a mime-type</h3>
|
|
<pre><code>
|
|
Merb.add_mime_type :pdf, :to_pdf, %w[application/pdf], "Content-Encoding" => "gzip"
|
|
</code></pre>
|
|
<h3>What this means is:</h3>
|
|
<ul>
|
|
<li>Add a mime-type for :pdf</li>
|
|
<li>Register the method for converting objects to PDF as <code>#to_pdf</code>.</li>
|
|
<li>Register the incoming mime-type "Accept" header as <code>application/pdf</code>.</li>
|
|
<li>Specify a new header for PDF types so it will set <code>Content-Encoding</code> to gzip.</li>
|
|
</ul>
|
|
|
|
<h3>You can then do:</h3>
|
|
<pre><code>
|
|
class Foo < Application
|
|
provides :pdf
|
|
end
|
|
</code></pre>
|
|
|
|
<h3>Where can I find help?</h3>
|
|
<p>If you have any questions or if you can't figure something out, please take a
|
|
look at our <a href="http://merbivore.com/"> project page</a>,
|
|
feel free to come chat at irc.freenode.net, channel #merb,
|
|
or post to <a href="http://groups.google.com/group/merb">merb mailing list</a>
|
|
on Google Groups.</p>
|
|
|
|
<h3>What if I've found a bug?</h3>
|
|
<p>If you want to file a bug or make your own contribution to Merb,
|
|
feel free to register and create a ticket at our
|
|
<a href="http://merb.lighthouseapp.com/">project development page</a>
|
|
on Lighthouse.</p>
|
|
|
|
<h3>How do I edit this page?</h3>
|
|
<p>You can change what people see when this happens by editing <tt>app/views/exceptions/not_acceptable.html.erb</tt>.</p>
|
|
|
|
</div>
|
|
|
|
<div id="footer-container">
|
|
<hr />
|
|
<div class="left"></div>
|
|
<div class="right">© 2007 the merb dev team</div>
|
|
<p> </p>
|
|
</div>
|
|
</div>
|