Commit 2f2b7b7e5e5b0cdfd242d50e8052a50f74a1e7fd

Authored by Georg Hopp
1 parent b53a15f0

create dashboard controller and update root route to it.

  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/
... ...
  1 +// Place all the styles related to the Dashboard controller here.
  2 +// They will automatically be included in application.css.
  3 +// You can use Sass (SCSS) here: http://sass-lang.com/
... ...
  1 +class DashboardController < ApplicationController
  2 + def index
  3 + end
  4 +end
... ...
  1 +module DashboardHelper
  2 +end
... ...
  1 +<h1>Dashboard#index</h1>
  2 +<p>Find me in app/views/dashboard/index.html.erb</p>
... ...
1 1 Rails.application.routes.draw do
  2 + get 'dashboard/index'
  3 +
2 4 # The priority is based upon order of creation: first created -> highest priority.
3 5 # See how all your routes lay out with "rake routes".
4 6
5 7 # You can have the root of your site routed with "root"
6   - # root 'welcome#index'
  8 + root 'dashboard#index'
7 9
8 10 # Example of regular route:
9 11 # get 'products/:id' => 'catalog#view'
... ...
  1 +require 'test_helper'
  2 +
  3 +class DashboardControllerTest < ActionController::TestCase
  4 + test "should get index" do
  5 + get :index
  6 + assert_response :success
  7 + end
  8 +
  9 +end
... ...
Please register or login to post a comment