Skip to content

Commit

Permalink
Merge pull request #44 from Eclisse-Music-Institute/ADD_home_index
Browse files Browse the repository at this point in the history
[ADD] home index #2
  • Loading branch information
sfeuga committed Nov 29, 2020
2 parents 41a3bee + 92e3827 commit cb3a709
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/haml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
with:
ruby-version: '2.7.2'
- run: gem install --no-doc 'haml_lint:>=0.36.0'
- run: files=$(git ls-files | grep -E "\.haml" | grep -vE "\.yml"; exit 0) && haml-lint $files --exclude-linter RuboCop --reporter progress --reporter json >> haml.json && cat haml.json
- run: files=$(git ls-files | grep -E "\.haml" | grep -vE "\.yml|_form.html.haml"; exit 0) && haml-lint $files --exclude-linter RuboCop --reporter progress --reporter json >> haml.json && cat haml.json
id: haml
- uses: duderman/rubocop-annotate-action@v0.1.0
with:
Expand Down
3 changes: 3 additions & 0 deletions app/assets/stylesheets/home.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the home controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/
8 changes: 8 additions & 0 deletions app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true

###
# HomeController Class
#
class HomeController < ApplicationController
def index; end
end
7 changes: 7 additions & 0 deletions app/helpers/home_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

###
# HomeHelper Module
#
module HomeHelper
end
2 changes: 2 additions & 0 deletions app/views/home/index.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
%h1 Home#index
%p Find me in app/views/home/index.html.haml
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

Rails.application.routes.draw do
get 'home/index'
root 'home#index'
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
end
13 changes: 13 additions & 0 deletions test/controllers/home_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# frozen_string_literal: true

require 'test_helper'

###
# HomeControllerTest Class
#
class HomeControllerTest < ActionDispatch::IntegrationTest
test 'should get index' do
get home_index_url
assert_response :success
end
end

0 comments on commit cb3a709

Please sign in to comment.