asciinema.org/app/controllers/asciicasts_controller.rb
2012-03-08 15:00:10 +01:00

19 lines
317 B
Ruby

class AsciicastsController < ApplicationController
PER_PAGE = 20
respond_to :html, :json
def index
@asciicasts = Asciicast.
order("created_at DESC").
page(params[:page]).
per(PER_PAGE)
end
def show
@asciicast = Asciicast.find(params[:id])
respond_with @asciicast
end
end