Skip to content

Commit acc9d83

Browse files
committed
Add home controller
1 parent 238cffd commit acc9d83

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# frozen_string_literal: true
2+
3+
class Hotsheet::HomeController < Hotsheet::ApplicationController
4+
def show; end
5+
6+
def error
7+
render "error", status: :not_found
8+
end
9+
end

app/controllers/hotsheet/sheets_controller.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ def update
1818
end
1919
end
2020

21-
def error
22-
render "error", status: :not_found
23-
end
24-
2521
private
2622

2723
def set_sheet
File renamed without changes.
File renamed without changes.

config/routes.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
Hotsheet::Engine.routes.draw do
44
next unless defined? Rails::Server
55

6+
root "home#show"
7+
68
Hotsheet.sheets.each_key do |sheet_name|
79
resources sheet_name, sheet_name:, controller: :sheets, only: %i[index update]
810
end
911

10-
root "sheets#root"
11-
match "*path", to: "sheets#error", via: :all
12+
match "*path", to: "home#error", via: :all
1213
end

0 commit comments

Comments
 (0)