examples/rapaste/controller/paste.rb in ramaze-0.3.5 vs examples/rapaste/controller/paste.rb in ramaze-0.3.9

- old
+ new

@@ -1,11 +1,11 @@ -Ramaze::Contrib::Route[%r!^/(\d+)\.(?:te?xt|plain)$!] = '/plain/%d' -Ramaze::Contrib::Route[%r!^/(?:te?xt|plain)/(\d+)$!] = '/plain/%d' -Ramaze::Contrib::Route[%r!^/(\d+)\.(\w+)$!] = '/view/%d/%s' -Ramaze::Contrib::Route[%r!^/(\d+)$!] = '/view/%d/html' -Ramaze::Contrib::Route[%r!^/list/page/(\d+)$!] = '/list/%d' -# Ramaze::Contrib::Route[%r!^/list/?(.*)!] = '/%s' +Ramaze::Route[%r!^/(\d+)\.(?:te?xt|plain|rb|css|js)$!] = '/plain/%d' +Ramaze::Route[%r!^/(?:te?xt|plain|rb|css|js)/(\d+)$!] = '/plain/%d' +Ramaze::Route[%r!^/(\d+)\.(\w+)$!] = '/view/%d/%s' +Ramaze::Route[%r!^/(\d+)$!] = '/view/%d/html' +Ramaze::Route[%r!^/list/page/(\d+)$!] = '/list/%d' +# Ramaze::Route[%r!^/list/?(.*)!] = '/%s' class PasteController < Ramaze::Controller map :/ engine :Ezamar helper :formatting, :sequel, :aspect @@ -13,10 +13,10 @@ deny_layout :plain, :save_theme def list(start = 1) ordered = Paste.order(:created.DESC) @paginated = ordered.paginate(start.to_i, 10) - @pager = paginator(@paginated, '/list/page') + @pager = paginator(@paginated, '/list') @pastes = @paginated @style = style end def search