asciinema.org/config/routes.rb

55 lines
1.4 KiB
Ruby
Raw Normal View History

2014-08-30 17:38:47 +00:00
Rails.application.routes.draw do
2012-03-01 23:25:55 +00:00
get "/browse" => "asciicasts#index", :as => :browse
get "/browse/:category" => "asciicasts#index", :as => :category
2012-07-25 18:24:20 +00:00
get '/a/:id.js' => redirect(ActionController::Base.helpers.asset_path("widget.js"), status: 302)
resources :asciicasts, path: 'a' do
2012-11-19 22:10:21 +00:00
member do
get '/raw' => 'api/asciicasts#show'
get :example
2012-11-19 22:10:21 +00:00
end
end
2011-11-23 21:30:09 +00:00
2014-10-05 17:53:00 +00:00
get "/u/:id" => "users#show", as: :unnamed_user
get "/~:username" => "users#show", as: :public_profile
2012-03-04 22:44:36 +00:00
2015-03-29 18:19:18 +00:00
get "/oembed" => "oembed#show", as: :oembed
namespace :api do
resources :asciicasts
end
get "/docs" => "docs#show", :page => 'getting-started', :as => :docs_index
get "/docs/:page" => "docs#show", :as => :docs
2012-03-04 21:44:04 +00:00
2014-10-12 18:36:31 +00:00
resource :login, only: [:new, :create] do
get :sent
end
get "/login" => redirect("/login/new")
2017-02-21 09:10:37 +00:00
get "/login/:token" => "sessions#new", as: :login_token
post "/login/:token" => "sessions#create"
get "/logout" => "sessions#destroy"
2015-04-02 09:45:39 +00:00
resources :api_tokens, only: [:create, :destroy]
2014-02-09 13:44:09 +00:00
get "/connect/:api_token" => "api_tokens#create"
2012-03-04 19:30:26 +00:00
2013-10-19 16:25:30 +00:00
resource :user
2012-03-05 23:25:21 +00:00
2014-10-17 15:28:22 +00:00
resource :username do
get :skip
end
2013-08-08 12:31:03 +00:00
root 'home#show'
2012-04-29 08:47:33 +00:00
2013-11-18 11:22:29 +00:00
get '/about' => 'pages#show', page: :about, as: :about
2013-10-25 18:01:56 +00:00
get '/privacy' => 'pages#show', page: :privacy, as: :privacy
2013-10-26 20:50:54 +00:00
get '/tos' => 'pages#show', page: :tos, as: :tos
2013-12-03 19:09:18 +00:00
get '/contributing' => 'pages#show', page: :contributing, as: :contributing
2015-04-18 14:02:45 +00:00
get '/contact' => 'pages#show', page: :contact, as: :contact
2014-08-30 17:38:47 +00:00
end