Revisão | 1f232385116d946b184a78229c7843f856f8ca62 (tree) |
---|---|
Hora | 2014-03-12 13:57:57 |
Autor | Tatsuki Sugiura <sugi@nemu...> |
Commiter | Tatsuki Sugiura |
Add hello controller.
@@ -0,0 +1,3 @@ | ||
1 | +# Place all the behaviors and hooks related to the matching controller here. | |
2 | +# All this logic will automatically be available in application.js. | |
3 | +# You can use CoffeeScript in this file: http://coffeescript.org/ |
@@ -0,0 +1,3 @@ | ||
1 | +// Place all the styles related to the hello controller here. | |
2 | +// They will automatically be included in application.css. | |
3 | +// You can use Sass (SCSS) here: http://sass-lang.com/ |
@@ -0,0 +1,4 @@ | ||
1 | +class HelloController < ApplicationController | |
2 | + def index | |
3 | + end | |
4 | +end |
@@ -0,0 +1,2 @@ | ||
1 | +module HelloHelper | |
2 | +end |
@@ -0,0 +1,2 @@ | ||
1 | +<h1>Hello#index</h1> | |
2 | +<p>Find me in app/views/hello/index.html.erb</p> |
@@ -1,4 +1,5 @@ | ||
1 | 1 | Hello::Application.routes.draw do |
2 | + get "hello/index" | |
2 | 3 | # The priority is based upon order of creation: first created -> highest priority. |
3 | 4 | # See how all your routes lay out with "rake routes". |
4 | 5 |
@@ -0,0 +1,9 @@ | ||
1 | +require 'test_helper' | |
2 | + | |
3 | +class HelloControllerTest < ActionController::TestCase | |
4 | + test "should get index" do | |
5 | + get :index | |
6 | + assert_response :success | |
7 | + end | |
8 | + | |
9 | +end |
@@ -0,0 +1,4 @@ | ||
1 | +require 'test_helper' | |
2 | + | |
3 | +class HelloHelperTest < ActionView::TestCase | |
4 | +end |