Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. def adventure
  2. end
  3.  
  4. def cooking
  5. end
  6.  
  7. def dancing
  8. end
  9.  
  10. def programming
  11. end
  12.  
  13. def reading
  14. end
  15.  
  16. def running
  17. end
  18.  
  19. def sports
  20. end
  21.  
  22. def writing
  23. end
  24.  
  25. adventure.html.erb
  26. cooking.html.erb
  27. dancing.html.erb
  28. programming.html.erb
  29. reading.html.erb
  30. running.html.erb
  31. sports.html.erb
  32. writing.html.erb
  33.  
  34. match '/adventure', to: 'pages#adventure', via: 'get'
  35. match '/cooking', to: 'pages#fighting', via: 'get'
  36. match '/dancing', to: 'pages#first_person_shooter', via: 'get'
  37.  
  38. match '/programming', to: 'pages#programming', via: 'get'
  39. match '/reading', to: 'pages#reading', via: 'get'
  40. match '/running', to: 'pages#running', via: 'get'
  41. match '/sports', to: 'pages#sports', via: 'get'
  42. match '/writing', to: 'pages#writing', via: 'get'
  43.  
  44. class PageController < ApplicationController
  45. end
  46.  
  47. adventure.html.erb
  48. cooking.html.erb
  49. dancing.html.erb
  50. programming.html.erb
  51. reading.html.erb
  52. running.html.erb
  53. sports.html.erb
  54. writing.html.erb
  55.  
  56. match '/adventure', to: 'pages#adventure', via: 'get'
  57. match '/cooking', to: 'pages#cooking', via: 'get'
  58. match '/dancing', to: 'pages#dancing', via: 'get'
  59.  
  60. match '/programming', to: 'pages#programming', via: 'get'
  61. match '/reading', to: 'pages#reading', via: 'get'
  62. match '/running', to: 'pages#running', via: 'get'
  63. match '/sports', to: 'pages#sports', via: 'get'
  64. match '/writing', to: 'pages#writing', via: 'get'
  65.  
  66. %w(adventure cooking dancing programming reading running sports writing).each do |page|
  67. match "/#{page}", to: "pages##{page}", via: 'get'
  68. end
  69.  
  70. get '/:static_page', to: 'pages#show', constraints: {static_page: /A(adventure|cooking|dancing|programming)z/ }
  71.  
  72. def show
  73. render params[:static_page]
  74. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement