Added dashboard for admin, only scaffold
This commit is contained in:
4
app/controllers/admin/dashboards_controller.rb
Normal file
4
app/controllers/admin/dashboards_controller.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
class Admin::DashboardsController < ApplicationController
|
||||
def show
|
||||
end
|
||||
end
|
||||
2
app/helpers/admin/dashboards_helper.rb
Normal file
2
app/helpers/admin/dashboards_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module Admin::DashboardsHelper
|
||||
end
|
||||
4
app/views/admin/dashboards/show.html.erb
Normal file
4
app/views/admin/dashboards/show.html.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<div>
|
||||
<h1 class="font-bold text-4xl">Admin::Dashboards#show</h1>
|
||||
<p>Find me in app/views/admin/dashboards/show.html.erb</p>
|
||||
</div>
|
||||
@@ -17,9 +17,9 @@ Rails.application.routes.draw do
|
||||
end
|
||||
resource :profile, only: [ :show, :edit, :destroy ]
|
||||
namespace :admin do
|
||||
resource :users
|
||||
resource :jobs
|
||||
resource :dashboard
|
||||
resources :users
|
||||
resources :jobs
|
||||
resource :dashboard, only: [ :show ]
|
||||
end
|
||||
namespace :operator do
|
||||
resources :jobs do
|
||||
|
||||
8
test/controllers/admin/dashboard_controller_test.rb
Normal file
8
test/controllers/admin/dashboard_controller_test.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
require "test_helper"
|
||||
|
||||
class Admin::DashboardControllerTest < ActionDispatch::IntegrationTest
|
||||
test "should get index" do
|
||||
get admin_dashboard_index_url
|
||||
assert_response :success
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user