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'
|
2011-03-23 15:23:01 -07:00
|
|
|
|
2023-11-11 15:18:01 -08:00
|
|
|
# Login and account management!
|
2024-04-08 04:02:54 -07:00
|
|
|
devise_for :auth_users, path: "users", skip: [:registrations]
|
|
|
|
resources :auth_users, only: [:new, :create, :update]
|
|
|
|
get '/users/edit', to: 'auth_users#edit', as: 'edit_auth_user'
|
2023-11-11 15:18:01 -08:00
|
|
|
|
|
|
|
# The outfit editor!
|
2023-08-10 18:37:13 -07:00
|
|
|
# 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'
|
|
|
|
|
2023-11-11 15:18:01 -08:00
|
|
|
# The outfits users have created!
|
|
|
|
resources :outfits, :only => [:show, :create, :update, :destroy]
|
|
|
|
get '/your-outfits', to: 'outfits#index', as: :current_user_outfits
|
|
|
|
get '/users/current-user/outfits', to: redirect('/your-outfits')
|
|
|
|
|
2023-11-11 16:09:58 -08:00
|
|
|
# Our customization data! Both the item pages, and JSON API endpoints.
|
2010-11-06 10:07:12 -07:00
|
|
|
resources :items, :only => [:index, :show] do
|
2024-01-21 03:10:06 -08:00
|
|
|
resources :trades, path: 'trades/:type', controller: 'item_trades',
|
2024-01-21 04:40:25 -08:00
|
|
|
only: [:index], constraints: {type: /offering|seeking/}
|
2024-01-21 03:10:06 -08:00
|
|
|
|
2023-11-11 07:14:48 -08:00
|
|
|
resources :appearances, controller: 'item_appearances', only: [:index]
|
2024-01-21 03:10:06 -08:00
|
|
|
|
2010-11-05 15:45:05 -07:00
|
|
|
collection do
|
|
|
|
get :needed
|
Add bare-bones Item Getting Guide page
TNT requested that we figure out ways to connect the dots between
people's intentions on DTI to their purchases in the NC Mall.
But rather than just slam ad links everywhere, our plan is to design an
actually useful feature about it: the "Item Getting Guide". It'll break
down items by how you can actually get them (NP economy, NC Mall,
retired NC, Dyeworks, etc), and we're planning some cute actions you
can take, like shortcuts for getting them onto trade wishlists or into
your NC Mall cart.
This is just a little demo version of the page, just breaking down
items specified in the URL into NC/NP/PB! Later we'll do more granular
breakdown than this, with more info and actions—and we'll also like,
link to it at all, which isn't the case yet! (The main way we expect
people to get here is by a "Get these items" button we'll add to the
outfit editor, but there might be other paths, too.)
2024-05-06 20:37:59 -07:00
|
|
|
get "sources/:ids", action: :sources
|
2010-11-05 15:45:05 -07:00
|
|
|
end
|
|
|
|
end
|
2023-12-05 18:04:54 -08:00
|
|
|
resources :species, only: [] do
|
|
|
|
resources :colors, only: [] do
|
2023-11-11 16:09:58 -08:00
|
|
|
get :pet_type, to: 'pet_types#show'
|
|
|
|
end
|
2024-01-28 07:30:06 -08:00
|
|
|
resources :alt_styles, path: 'alt-styles', only: [:index]
|
2023-11-11 16:09:58 -08:00
|
|
|
end
|
2024-01-24 06:53:37 -08:00
|
|
|
resources :alt_styles, path: 'alt-styles', only: [:index]
|
2024-07-03 19:50:41 -07:00
|
|
|
resources :swf_assets, path: 'swf-assets', only: [:show]
|
2011-03-23 15:23:01 -07:00
|
|
|
|
2023-11-11 15:18:01 -08:00
|
|
|
# Loading and modeling pets!
|
2023-07-22 12:29:29 -07:00
|
|
|
post '/pets/load' => 'pets#load', :as => :load_pet
|
|
|
|
get '/modeling' => 'pets#bulk', :as => :bulk_pets
|
2011-03-23 15:23:01 -07:00
|
|
|
|
2023-11-11 15:18:01 -08:00
|
|
|
# Contributions to our modeling database!
|
|
|
|
resources :contributions, :only => [:index]
|
|
|
|
get 'users/top-contributors' => 'users#top_contributors', :as => :top_contributors
|
|
|
|
get 'users/top_contributors' => redirect('/users/top-contributors')
|
2011-03-23 15:23:01 -07:00
|
|
|
|
2023-11-11 15:18:01 -08:00
|
|
|
# User resources, like their item lists!
|
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]
|
2011-10-31 15:13:36 -07:00
|
|
|
resources :closet_hangers, :only => [:index, :update, :destroy], :path => 'closet' do
|
2011-07-30 23:48:16 -07:00
|
|
|
collection do
|
|
|
|
get :petpage
|
2015-09-26 19:55:09 -07:00
|
|
|
put :update
|
2015-07-19 09:35:49 -07:00
|
|
|
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'
|
2011-07-15 13:15:57 -07:00
|
|
|
|
|
|
|
resources :items, :only => [] do
|
2011-10-10 19:43:46 -07:00
|
|
|
resources :closet_hangers, :only => [:create] do
|
|
|
|
collection do
|
|
|
|
put :update_quantities
|
|
|
|
end
|
|
|
|
end
|
2011-07-15 13:15:57 -07:00
|
|
|
end
|
2014-01-18 19:54:11 -08:00
|
|
|
|
|
|
|
resources :neopets_connections, path: 'neopets-connections',
|
|
|
|
only: [:create, :destroy]
|
2024-04-07 07:52:23 -07:00
|
|
|
|
|
|
|
resource :neopass_connection, path: "neopass-connection", only: [:destroy]
|
2010-11-05 15:45:05 -07:00
|
|
|
end
|
2023-11-11 15:18:01 -08:00
|
|
|
get 'users/current-user/closet' => 'closet_hangers#index', :as => :your_items
|
2011-07-12 17:51:43 -07:00
|
|
|
|
2023-11-11 15:18:01 -08:00
|
|
|
# Importing users' owned items from Neopets.com!
|
|
|
|
scope 'import' do
|
|
|
|
resources :neopets_page_import_tasks, only: [:new, :create],
|
|
|
|
path: ':page_type/pages/:expected_index'
|
|
|
|
end
|
|
|
|
|
|
|
|
# Donation campaign stuff!
|
2024-02-18 20:29:31 -08:00
|
|
|
scope module: "fundraising", as: "fundraising" do
|
2024-02-18 20:12:14 -08:00
|
|
|
resources :donations, only: [:create, :show, :update] do
|
|
|
|
collection do
|
|
|
|
resources :donation_features, path: 'features', only: [:index]
|
|
|
|
end
|
2014-09-10 13:38:26 -07:00
|
|
|
end
|
2024-02-18 20:12:14 -08:00
|
|
|
resources :campaigns, only: [:show], path: '/donate/campaigns'
|
2014-09-10 13:38:26 -07:00
|
|
|
end
|
2024-02-18 20:29:31 -08:00
|
|
|
get '/donate' => 'fundraising/campaigns#current', as: :donate
|
2015-08-05 16:26:12 -07:00
|
|
|
|
2024-03-12 17:58:44 -07:00
|
|
|
# About pages!
|
2024-03-12 17:12:43 -07:00
|
|
|
get '/terms', to: "about#terms", as: :terms
|
2024-03-30 23:36:03 -07:00
|
|
|
get '/privacy',
|
|
|
|
to: redirect(Rails.configuration.impress_2020_origin + "/privacy")
|
2024-03-12 17:58:44 -07:00
|
|
|
get '/about/neopass', to: 'about#neopass'
|
2011-05-20 17:49:48 -07:00
|
|
|
|
2023-11-11 15:18:01 -08:00
|
|
|
# Other useful lil things!
|
2023-07-22 12:29:29 -07:00
|
|
|
get '/sitemap.xml' => 'sitemap#index', :as => :sitemap, :format => :xml
|
|
|
|
get '/robots.txt' => 'sitemap#robots', :as => :robots, :format => :text
|
2023-11-11 15:18:01 -08:00
|
|
|
post '/locales/choose' => 'locales#choose', :as => :choose_locale
|
2013-03-05 19:09:08 -08:00
|
|
|
end
|