use url for open modal

pull/402/merge
Pete Matsyburka 1 month ago
parent 34ea639c25
commit ca0acb34d6

@ -22,7 +22,7 @@
<% if params[:modal].present? %> <% if params[:modal].present? %>
<% url_params = Rails.application.routes.recognize_path(params[:modal], method: :get) %> <% url_params = Rails.application.routes.recognize_path(params[:modal], method: :get) %>
<% if url_params[:action] == 'new' %> <% if url_params[:action] == 'new' %>
<open-modal src="<%= params[:modal] %>"></open-modal> <open-modal src="<%= url_for(url_params) %>"></open-modal>
<% end %> <% end %>
<% end %> <% end %>
<turbo-frame id="modal"></turbo-frame> <turbo-frame id="modal"></turbo-frame>

Loading…
Cancel
Save