adrienpoly / rubyvideo

Indexing all Ruby related videos
https://rubyvideo.dev
196 stars 30 forks source link

Sign in modal #193

Closed adrienpoly closed 2 weeks ago

adrienpoly commented 2 weeks ago

add remote modal for sign in

to open a page in a remote modal update the turbo frame target

<%= link_to sign_in_path(redirect_to: request.fullpath), data: {turbo_frame: "modal"} do %>

add the concern to the controller

class SessionsController < ApplicationController
  include RemoteModal
  allowed_remote_modal_actions :new
  ...
end

CleanShot 2024-09-12 at 18 07 35@2x