Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Commit

Permalink
fixed issue #59 - merge home controller into pages controller
Browse files Browse the repository at this point in the history
  • Loading branch information
mokolabs committed Feb 26, 2012
1 parent 0e9a798 commit 01a39e9
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 13 deletions.
7 changes: 0 additions & 7 deletions app/controllers/home_controller.rb

This file was deleted.

14 changes: 13 additions & 1 deletion app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
class PagesController < ApplicationController

def about
end

def index
@podcast = Podcast.published.first
end

def sponsors
return "sponsors"
end

def thanks
end

def tshirts
end

end
File renamed without changes.
1 change: 1 addition & 0 deletions app/views/pages/about.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
%h1=t "About SD Ruby"
File renamed without changes.
1 change: 1 addition & 0 deletions app/views/pages/sponsors.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
%h1=t "Sponsors"
File renamed without changes.
File renamed without changes.
14 changes: 9 additions & 5 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
SDRuby::Application.routes.draw do
match "/tshirts" => "home#tshirts", as: :tshirts
match "/thanks" => "home#thanks", as: :thanks

# Homepage
root to: 'pages#index'

# Custom routes
match "/tshirts" => "pages#tshirts", as: :tshirts
match "/thanks" => "pages#thanks", as: :thanks
match "/logout" => "user_sessions#destroy", as: :logout
match "/login" => "user_sessions#new", as: :login
match "/register" => "users#new", as: :register
match "/forgot" => "users#forgot_password", as: :password_reset

match "/sponsors" => "pages#sponsors", as: :sponsors
match "/forgot" => "users#forgot_password", as: :password_reset

# Resources
resources :podcasts do
get :search, on: :collection
end
Expand All @@ -19,5 +24,4 @@
resources :users
resource :user_session

root to: 'home#index'
end

0 comments on commit 01a39e9

Please sign in to comment.