Skip to content

Commit

Permalink
Add in a root to the application.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathie committed Apr 13, 2010
1 parent eed71c4 commit 35d424c
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 276 deletions.
4 changes: 4 additions & 0 deletions app/controllers/root_controller.rb
@@ -0,0 +1,4 @@
class RootController < ApplicationController
def index
end
end
3 changes: 2 additions & 1 deletion app/views/layouts/application.html.haml
Expand Up @@ -16,7 +16,8 @@
%h1= link_to "SagePay Rails Example", root_path

%ul#navigation
%li.first= link_to 'Home', root_path
%li.first= link_to 'Home', root_path
%li= link_to 'Currencies', currencies_path

%hr
#content
Expand Down
14 changes: 14 additions & 0 deletions app/views/root/index.html.haml
@@ -0,0 +1,14 @@
%h1 Welcome

%p
The purpose of this application is to test out the integration with the
SagePay API of our sage_pay gem. It is in no way affiliated with Sage, it
doesn't have their blessing and it certainly hasn't been funded by them
(though that would be nice!).

%p
As functionality is incorporated to the app, it will be linked to, where
possible, from here. So far, there is:

%ul
%li= link_to "Currency management", currencies_path
2 changes: 2 additions & 0 deletions config/routes.rb
@@ -1,3 +1,5 @@
ActionController::Routing::Routes.draw do |map|
map.resources :currencies

map.root :controller => 'root'
end
Binary file removed public/images/rails.png
Binary file not shown.
275 changes: 0 additions & 275 deletions public/index.html

This file was deleted.

19 changes: 19 additions & 0 deletions spec/controllers/root_controller_spec.rb
@@ -0,0 +1,19 @@
require 'spec_helper'

describe RootController do
describe "responding to GET index" do
def do_get
get :index
end

it "should be successful" do
do_get
response.should be_success
end

it "should render the index template" do
do_get
response.should render_template('index')
end
end
end

0 comments on commit 35d424c

Please sign in to comment.