Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kazeburo committed Mar 29, 2011
1 parent b27cab3 commit 83a8fd8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/NoNoPaste.pm
Expand Up @@ -113,7 +113,7 @@ get '/entry/{id:[0-9a-f]{16}}/raw' => sub {
my $entry = $self->retrieve_entry($c->args->{id});
return $c->res->not_found() unless $entry;
$c->res->content_type('text/plain; charset=UTF-8');
$c->render('raw_entry', entry => $entry );
$c->res->body( $entry->{body} );
};

1;
Expand Down Expand Up @@ -178,7 +178,7 @@ $(function() {
<pre class="prettyprint">
<: $entry.body :>
</pre>
<div class="entry_meta"><a href="<: $c.req.uri_for('/entry/' ~ $entry.id) :>" class="date"><: $entry.ctime :></a> / <span class="nick"><: $entry.nick :></span></div>
<div class="entry_meta"><a href="<: $c.req.uri_for('/entry/' ~ $entry.id ~ '/raw') :>">raw</a> / <a href="<: $c.req.uri_for('/entry/' ~ $entry.id) :>" class="date"><: $entry.ctime :></a> / <span class="nick"><: $entry.nick :></span></div>
</div>
: }
Expand Down Expand Up @@ -217,12 +217,10 @@ $(function() {
<pre class="prettyprint">
<: $entry.body :>
</pre>
<div class="entry_meta"><a href="<: $c.req.uri_for('/entry/' ~ $entry.id ~ '/raw') :>/">raw</a> / <a href="<: $c.req.uri_for('/entry/' ~ $entry.id) :>" class="date"><: $entry.ctime :></a> / <span class="nick"><: $entry.nick :></span></div>
<div class="entry_meta"><a href="<: $c.req.uri_for('/entry/' ~ $entry.id ~ '/raw') :>">raw</a> / <a href="<: $c.req.uri_for('/entry/' ~ $entry.id) :>" class="date"><: $entry.ctime :></a> / <span class="nick"><: $entry.nick :></span></div>
</div>
: } # content
@@ raw_entry
<:= $entry.body :>

0 comments on commit 83a8fd8

Please sign in to comment.