1
0
Fork 0
forked from OpenNeo/impress
impress/config/routes.rb

90 lines
3 KiB
Ruby
Raw Normal View History

2013-03-05 13:10:25 -08:00
OpenneoImpressItems::Application.routes.draw do
2010-11-05 15:45:05 -07:00
root :to => 'outfits#new'
# TODO: It's a bit silly that outfits/new points to outfits#edit.
# Should we refactor the controller/view structure here?
get '/outfits/new', to: 'outfits#edit', as: :wardrobe
get '/wardrobe' => redirect('/outfits/new')
get '/start/:color_name/:species_name' => 'outfits#start'
get '/species/:species_id/color/:color_id/pet_type.json' => 'pet_types#show'
2010-11-05 15:45:05 -07:00
resources :contributions, :only => [:index]
2010-11-06 10:07:12 -07:00
resources :items, :only => [:index, :show] do
resources :appearances, controller: 'item_appearances', only: [:index]
2010-11-05 15:45:05 -07:00
collection do
get :needed
end
end
resources :outfits, :only => [:show, :create, :update, :destroy]
2010-10-10 19:18:42 -07:00
resources :pet_attributes, :only => [:index]
resources :swf_assets, :only => [:show] do
2015-05-03 14:57:42 -07:00
collection do
get :links
end
end
resources :zones, only: [:index]
2011-08-02 19:42:56 -07:00
scope 'import' do
2015-07-27 10:25:24 -07:00
resources :neopets_page_import_tasks, only: [:new, :create],
path: ':page_type/pages/:expected_index'
2011-08-02 19:42:56 -07:00
end
2011-07-12 17:51:43 -07:00
get '/your-outfits', to: 'outfits#index', as: :current_user_outfits
get '/users/current-user/outfits', to: redirect('/your-outfits')
post '/pets/load' => 'pets#load', :as => :load_pet
get '/modeling' => 'pets#bulk', :as => :bulk_pets
devise_for :auth_users
post '/locales/choose' => 'locales#choose', :as => :choose_locale
get "petpages/new"
get "closet_lists/new"
get "closet_lists/create"
2011-08-05 08:28:11 -07:00
resources :users, :path => 'user', :only => [:index, :update] do
2010-11-05 15:45:05 -07:00
resources :contributions, :only => [:index]
resources :closet_hangers, :only => [:index, :update, :destroy], :path => 'closet' do
2011-07-30 23:48:16 -07:00
collection do
get :petpage
put :update
delete :destroy
2011-07-30 23:48:16 -07:00
end
end
2011-07-29 07:52:04 -07:00
resources :closet_lists, :only => [:new, :create, :edit, :update, :destroy], :path => 'closet/lists'
resources :items, :only => [] do
resources :closet_hangers, :only => [:create] do
collection do
put :update_quantities
end
end
end
resources :neopets_connections, path: 'neopets-connections',
only: [:create, :destroy]
2010-11-05 15:45:05 -07:00
end
2011-07-12 17:51:43 -07:00
2014-09-10 13:38:26 -07:00
resources :donations, only: [:create, :show, :update] do
collection do
resources :donation_features, path: 'features', only: [:index]
end
end
2014-09-09 19:06:38 -07:00
2015-08-05 16:26:12 -07:00
resources :campaigns, only: [:show], path: '/donate/campaigns'
get '/donate' => 'campaigns#current', as: :donate
2015-08-05 16:26:12 -07:00
get 'users/current-user/closet' => 'closet_hangers#index', :as => :your_items
2011-07-31 15:45:53 -07:00
get 'users/top-contributors' => 'users#top_contributors', :as => :top_contributors
get 'users/top_contributors' => redirect('/users/top-contributors')
get 'image-mode' => 'static#image_mode', :as => :image_mode
2023-10-12 17:51:44 -07:00
get '/pardon-our-dust' => 'static#pardon_our_dust', :as => :pardon_our_dust
get '/terms' => redirect("https://impress-2020.openneo.net/terms"), :as => :terms
2011-05-20 17:49:48 -07:00
get '/sitemap.xml' => 'sitemap#index', :as => :sitemap, :format => :xml
get '/robots.txt' => 'sitemap#robots', :as => :robots, :format => :text
end