use url for open modal

This commit is contained in:
Pete Matsyburka
2026-02-14 11:27:00 +02:00
parent 34ea639c25
commit ca0acb34d6
+1 -1
View File
@@ -22,7 +22,7 @@
<% if params[:modal].present? %>
<% url_params = Rails.application.routes.recognize_path(params[:modal], method: :get) %>
<% if url_params[:action] == 'new' %>
<open-modal src="<%= params[:modal] %>"></open-modal>
<open-modal src="<%= url_for(url_params) %>"></open-modal>
<% end %>
<% end %>
<turbo-frame id="modal"></turbo-frame>