Sha256: 8b6cb24127e0583f18412dd01e85f385a94748a1d3356da35a0183f5de56480d
Contents?: true
Size: 604 Bytes
Versions: 4
Compression:
Stored size: 604 Bytes
Contents
module PgAssociable module Helpers def pg_respond_abrir_modal respond_to do |format| format.turbo_stream do render turbo_stream: turbo_stream.append_all('body', partial: 'pg_associable_modal') end end end def pg_respond_buscar partial = params[:partial] || 'pg_associable/resultados' @collection = policy_scope(@clase_modelo).kept.query(params[:query]).limit(6) render turbo_stream: turbo_stream.update("resultados-#{params[:id]}", partial:, locals: { collection: @collection }) end end end
Version data entries
4 entries across 4 versions & 1 rubygems