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/api/asciicasts_controller.rb

15 lines
345 B
Ruby

class Api::AsciicastsController < ApplicationController
skip_before_filter :verify_authenticity_token
def create
ac = Asciicast.new(params[:asciicast])
if ac.save
render :text => asciicast_url(ac), :status => :created, :location => ac
else
render :text => ac.errors.full_messages, :status => 422
end
end
end