Browse Source

Generate welcome controller.

master
Georg Hopp 10 years ago
parent
commit
7823fa3890
  1. 3
      app/assets/javascripts/welcome.coffee
  2. 3
      app/assets/stylesheets/welcome.scss
  3. 4
      app/controllers/welcome_controller.rb
  4. 2
      app/helpers/welcome_helper.rb
  5. 2
      app/views/welcome/index.html.erb
  6. 2
      config/routes.rb
  7. 9
      test/controllers/welcome_controller_test.rb

3
app/assets/javascripts/welcome.coffee

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/

3
app/assets/stylesheets/welcome.scss

@ -0,0 +1,3 @@
// Place all the styles related to the welcome controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

4
app/controllers/welcome_controller.rb

@ -0,0 +1,4 @@
class WelcomeController < ApplicationController
def index
end
end

2
app/helpers/welcome_helper.rb

@ -0,0 +1,2 @@
module WelcomeHelper
end

2
app/views/welcome/index.html.erb

@ -0,0 +1,2 @@
<h1>Welcome#index</h1>
<p>Find me in app/views/welcome/index.html.erb</p>

2
config/routes.rb

@ -1,4 +1,6 @@
Rails.application.routes.draw do Rails.application.routes.draw do
get 'welcome/index'
# The priority is based upon order of creation: first created -> highest priority. # The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes". # See how all your routes lay out with "rake routes".

9
test/controllers/welcome_controller_test.rb

@ -0,0 +1,9 @@
require 'test_helper'
class WelcomeControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
end
end
Loading…
Cancel
Save