/config/routes.rb

https://bitbucket.org/holarse/holarse · Ruby · 58 lines · 35 code · 15 blank · 8 comment · 0 complexity · b5a1aaf43f99d09bed1fae5d0b47d4da MD5 · raw file

  1. Holarse::Application.routes.draw do
  2. get "counting/messages"
  3. get "counting/discounts"
  4. # die angebotsaktionen
  5. resources :discount_events
  6. # die suche
  7. get "search/(:q)" => "search#show", :as => :search
  8. get "search/tags/:q" => "search#tags", :as => :searchtag
  9. # webseiten resourcen
  10. resources :users
  11. resources :news do
  12. resources :comments
  13. resources :links
  14. resources :screenshots
  15. resources :videos
  16. resources :attachments
  17. end
  18. resources :articles do
  19. resources :comments
  20. resources :links
  21. resources :screenshots
  22. resources :videos
  23. resources :attachments
  24. resources :shops
  25. end
  26. resource :twitter, :only => :show
  27. # login und sessionverwaltung
  28. match "login" => "sessions#new"
  29. match "logout" => "sessions#destroy"
  30. resource :session
  31. # einzelseiten
  32. get "service/minecraft"
  33. get "welcome/index"
  34. # shortcuts
  35. match "videos" => "media#videos"
  36. # redirects
  37. match "/redirect/twitter" => redirect("https://twitter.com/#!/holarse"), :as => :holarse_twitter
  38. match "/redirect/youtube/:channel" => redirect("https://www.youtube.com/user/%{channel}"), :as => :youtube_channel
  39. match '/redirect/osm/:city' => redirect("http://nominatim.openstreetmap.org/search.php?q=%{city}"), :as => :osm
  40. get '/version/:commitid' => redirect("https://bitbucket.org/holarse/holarse/changeset/%{commitid}"), :as => :version
  41. # root
  42. root :to => "welcome#index"
  43. end