From f28c637d10baefcef19e1495acf4bcc7c06978b3 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sat, 27 Jul 2013 01:23:08 +0200 Subject: [PATCH] Welcome controller added Can be used for main index, about page etc. --- app/assets/javascripts/welcome.js.coffee | 3 +++ app/assets/stylesheets/welcome.css.scss | 3 +++ app/controllers/welcome_controller.rb | 4 ++++ app/helpers/welcome_helper.rb | 2 ++ app/views/welcome/index.html.erb | 1 + test/controllers/welcome_controller_test.rb | 9 +++++++++ 6 files changed, 22 insertions(+) create mode 100644 app/assets/javascripts/welcome.js.coffee create mode 100644 app/assets/stylesheets/welcome.css.scss create mode 100644 app/controllers/welcome_controller.rb create mode 100644 app/helpers/welcome_helper.rb create mode 100644 app/views/welcome/index.html.erb create mode 100644 test/controllers/welcome_controller_test.rb diff --git a/app/assets/javascripts/welcome.js.coffee b/app/assets/javascripts/welcome.js.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/welcome.js.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/ diff --git a/app/assets/stylesheets/welcome.css.scss b/app/assets/stylesheets/welcome.css.scss new file mode 100644 index 0000000..77ce11a --- /dev/null +++ b/app/assets/stylesheets/welcome.css.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/ diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb new file mode 100644 index 0000000..f9b859b --- /dev/null +++ b/app/controllers/welcome_controller.rb @@ -0,0 +1,4 @@ +class WelcomeController < ApplicationController + def index + end +end diff --git a/app/helpers/welcome_helper.rb b/app/helpers/welcome_helper.rb new file mode 100644 index 0000000..eeead45 --- /dev/null +++ b/app/helpers/welcome_helper.rb @@ -0,0 +1,2 @@ +module WelcomeHelper +end diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb new file mode 100644 index 0000000..d652aa6 --- /dev/null +++ b/app/views/welcome/index.html.erb @@ -0,0 +1 @@ +

Hello, Rails!

\ No newline at end of file diff --git a/test/controllers/welcome_controller_test.rb b/test/controllers/welcome_controller_test.rb new file mode 100644 index 0000000..dff8e9d --- /dev/null +++ b/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