2011-11-23 20:41:25 +00:00
|
|
|
AsciiIo::Application.routes.draw do
|
2012-03-01 23:25:55 +00:00
|
|
|
|
2012-07-25 18:24:20 +00:00
|
|
|
match "/browse" => "asciicasts#index", :as => :browse
|
|
|
|
match "/browse/popular" => "asciicasts#popular", :as => :popular
|
|
|
|
|
2012-11-19 22:10:21 +00:00
|
|
|
resources :asciicasts, :path => 'a' do
|
|
|
|
member do
|
|
|
|
get :raw
|
|
|
|
end
|
|
|
|
end
|
2011-11-23 21:30:09 +00:00
|
|
|
|
2012-03-04 22:44:36 +00:00
|
|
|
match "/~:nickname" => "users#show", :as => :profile
|
|
|
|
|
2012-07-25 18:24:20 +00:00
|
|
|
match "/docs" => "docs#show", :page => 'record'
|
|
|
|
match "/docs/:page" => "docs#show", :as => :docs
|
2012-03-04 21:44:04 +00:00
|
|
|
|
2012-02-25 22:43:17 +00:00
|
|
|
match "/auth/:provider/callback" => "sessions#create"
|
|
|
|
match "/auth/failure" => "sessions#failure"
|
2011-11-21 21:36:42 +00:00
|
|
|
|
2012-03-04 10:33:11 +00:00
|
|
|
match "/login" => "sessions#new"
|
2012-02-25 22:43:17 +00:00
|
|
|
match "/logout" => "sessions#destroy"
|
2011-11-21 21:36:42 +00:00
|
|
|
|
2012-03-04 19:30:26 +00:00
|
|
|
match "/connect/:user_token" => "user_tokens#create"
|
|
|
|
|
2012-04-09 12:42:22 +00:00
|
|
|
resource :user, :only => [:create, :edit, :update]
|
2012-03-05 23:25:21 +00:00
|
|
|
|
2012-03-04 22:07:45 +00:00
|
|
|
namespace :api do
|
|
|
|
resources :comments
|
|
|
|
|
|
|
|
resources :asciicasts do
|
|
|
|
resources :comments
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2012-03-04 21:44:04 +00:00
|
|
|
root :to => 'home#show'
|
2012-04-29 08:47:33 +00:00
|
|
|
|
2012-08-28 20:59:27 +00:00
|
|
|
mount JasmineRails::Engine => "/specs" unless Rails.env.production?
|
|
|
|
|
2012-04-29 08:47:33 +00:00
|
|
|
match '*a', :to => 'application#not_found'
|
2011-11-21 21:36:42 +00:00
|
|
|
end
|