d_dnara

Joined

2,650 Experience
26 Lessons Completed
0 Questions Solved

Activity

Brilliant solution Chris! This is the cleanest lines of code I've ever seen for using stimulus dynamic select!

don't use link_to. user button_to. I removed rails-ujs btw

I put method: :delete on the logout link_to, but I don't know why it does "GET"

In addition, I have multiple devise model and scope it like below:

devise_scope :user do
authenticated :user do

I can not log out on Devise!

No route matches [GET] "/users/logout"

routes.rb
devise_for :users, path: 'users',
path_names: {sign_up: 'signup', sign_in: 'login', sign_out: 'logout'},
controllers: {
confirmations: 'users/confirmations',
sessions: 'users/sessions',
registrations: 'users/registrations'
}

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.