working through 15.3
This commit is contained in:
parent
fba21e7939
commit
c16c1361d3
@ -0,0 +1,5 @@
|
||||
class FooController < ApplicationController
|
||||
def index
|
||||
end
|
||||
|
||||
end
|
@ -1,5 +1,6 @@
|
||||
class StatusController < ApplicationController
|
||||
def index
|
||||
@title = "System Status"
|
||||
time = Time.now
|
||||
@time = time
|
||||
@ps = `ps aux`
|
||||
|
2
cookbook/015/hodgepodge/app/helpers/foo_helper.rb
Normal file
2
cookbook/015/hodgepodge/app/helpers/foo_helper.rb
Normal file
@ -0,0 +1,2 @@
|
||||
module FooHelper
|
||||
end
|
2
cookbook/015/hodgepodge/app/views/foo/index.html.erb
Normal file
2
cookbook/015/hodgepodge/app/views/foo/index.html.erb
Normal file
@ -0,0 +1,2 @@
|
||||
<h1>Foo#index</h1>
|
||||
<p>Find me in app/views/foo/index.html.erb</p>
|
@ -1,7 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Hodgepodge</title>
|
||||
<title>My Website - <%= @title %></title>
|
||||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
|
@ -1,4 +1,6 @@
|
||||
Hodgepodge::Application.routes.draw do
|
||||
get "foo/index"
|
||||
|
||||
# The priority is based upon order of creation:
|
||||
# first created -> highest priority.
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
require 'test_helper'
|
||||
|
||||
class FooControllerTest < ActionController::TestCase
|
||||
test "should get index" do
|
||||
get :index
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
end
|
@ -0,0 +1,4 @@
|
||||
require 'test_helper'
|
||||
|
||||
class FooHelperTest < ActionView::TestCase
|
||||
end
|
Loading…
Reference in New Issue
Block a user