/ home#index about GET /about pages#about faq GET /terms pages#terms todo /todo Todo::Engine ! Routes for Todo::Engine: tasks GET todo/tasks tasks#index POST todo/tasks tasks#create new_task GET todo/tasks/new tasks#new edit_task GET todo/tasks/:id/edit tasks#edit task GET todo/tasks/:id tasks#show PATCH todo/tasks/:id tasks#update PUT todo/tasks/:id tasks#update DELETE todo/tasks/:id tasks#destroy
“/about”, to: :about get “/terms”, to: :terms end resources :songs end Rails.application.routes.draw do root to: “pages#home ! controller :pages do get “/about”, to: :about get “/terms”, to: :terms end resources :songs ! # LEGACY ROUTES # ! get “/start” => redirect(“/”) get “/about-us” => redirect(“/about”) get “/home” => redirect(“/about”) resources :tracks, controller: :songs ! get “/home/songs” => redirect(“/songs”) get “/authenticate” => “devise#login” get “/auth/google” => “/authenticate” get “/sign_in” => redirect(“/login”)
:about get “/terms”, to: :terms end resources :songs ! ! end Rails.application.routes.draw do controller :pages do get “/about”, to: :about get “/terms”, to: :terms end resources :songs ! mount Legacy::Engine, at: “/” end Legacy::Engine.routes.draw do get “/start” => redirect(“/”) get “/about-us” => redirect(“/about”) get “/home” => redirect(“/about”) resources :tracks, controller: :songs end
end ! def current_user # … end end class ApplicationController < AC::Base before_filter :important_announcement ! private ! def important_announcement puts “Šime je glup” end end