% layout 'default';
% title 'Zerobin -- View';
% my %times = (day => 1, week => 7, month => 30, quarter => 90, year => 395);
% my @times = map { [l($_) => $times{$_}] } sort { $times{$a} <=> $times{$b} } keys(%times);
% stash 'styles' => 'zerobin';
% stash 'expire' => 30;
Создать запись
<%= form_for "/zerobin2/create" => (method => 'POST') => begin %>
<%= submit_button l('Save') %>
<%= tag 'label' => (for => 'expire') => l('Keep for') %>:
<%= select_field 'expire' => \@times %>
<%= check_box 'syntax' => 0 %>
<%= tag 'label' => (for => 'syntax') => l('Syntax highlight') %>
<% end %>
<%= tag 'textarea' => (id => "paste", placeholder => l('Paste your text here')) => '' %>