ฉันหวังว่าทั้งหมดเป็นอย่างดี. ฉันกำลังพยายามแก้ไขแบบฟอร์มลงทะเบียนและลงชื่อ แต่การแก้ไขไดเร็กทอรี view/users/registration และ sessions จะไม่เกิดผลใดๆ ฉันกำลังทำอะไรกับเส้นทางหรือไม่?
ขอบคุณ
เส้นทาง.rb
Rails.application.routes.draw do
devise_for :users
resources :users
get 'users/index'
match '/users', to: 'users#index', via: 'get'
match '/users/:id', to: 'users#show', via: 'get'
root to: "pages#home"
end
ตัวควบคุม/users_controller.rb
class UsersController < ApplicationController
def index
@users = User.all
end
def new
end
def show
@user = User.find_by_id(params[:id])
end
def edit
@user = User.find_by_id(params[:id])
end
end