You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
asciinema.org/app/controllers/asciicasts_controller.rb

16 lines
296 B
Ruby

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