pg_rails 7.0.8.pre.alpha.73 → 7.0.8.pre.alpha.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7fead42e7825fd503115e697fc2c276181f4eaf6accfd783c8ebd463cf5ae278
4
- data.tar.gz: 0ba91edbd93dd46d83a1d2aee3e77aba5d2d2d28d38625ddcce287b8ecb2a59e
3
+ metadata.gz: 1be4c79ea65550474a25d90dfe6350776ee4729e1606fc4a33f9b2d510c00f6e
4
+ data.tar.gz: 2455fe21d800515773fc24a930e2ef78d79ce05ebda5e579ca900b7c6ab9e8c6
5
5
  SHA512:
6
- metadata.gz: e55f215a88c48203ae08aa09b6005a376b3efc2fef02005b4719f19a8927bf8bca0865f663d4f08dc098a75e53dc50707ee111d78a3bfeb2d92e2d202cbdc026
7
- data.tar.gz: a0c3ce96cf9303518e40ba5a4b669db2a0570dff432d30aea65821ceffe2ad10016cc536459a69b819545dad5854b7f49549c1d4c3f615226fa6f235c95453d7
6
+ metadata.gz: 5dec9355d0371042c062dd6b90ae6306196965ef7c41ed59e672dddd38f658b2428e230f1c3e6ed82b4cb1e82657f48b7372b1b05c7d7062ccbc07cac903c711
7
+ data.tar.gz: 135d91aed0d9fdfe6e7aaa61d98a8cc2773516a6649eca3a65ee5fe2b49b563879276143ee49f4228605fc7caea8bc9cb1ef5a25fed54624dad73c9ef7006aad
@@ -9,6 +9,12 @@ module PgAssociable
9
9
  MAXIMO_PARA_SELECT = 10
10
10
  # TODO: si está entre 10 y 50, habilitar un buscador por js
11
11
 
12
+ def pg_associable_pro(atributo, options = {})
13
+ return input(atributo, options) if options[:disabled]
14
+
15
+ select_pro(atributo, options, nil)
16
+ end
17
+
12
18
  def pg_associable(atributo, options = {})
13
19
  return input(atributo, options) if options[:disabled]
14
20
 
@@ -15,8 +15,8 @@ class PgAssociableInput < SimpleForm::Inputs::StringInput
15
15
 
16
16
  def input(wrapper_options = nil)
17
17
  atributo = attribute_name.to_s.gsub('_id', '')
18
- url_modal = namespaced_path(clase_asociacion(atributo), prefix: :abrir_modal)
19
- url_search = namespaced_path(clase_asociacion(atributo), prefix: :buscar)
18
+ url_modal = options[:modal_url] || namespaced_path(clase_asociacion(atributo), prefix: :abrir_modal)
19
+ url_search = options[:buscar_url] || namespaced_path(clase_asociacion(atributo), prefix: :buscar)
20
20
 
21
21
  input_html_options[:data] = { url_search:, url_modal: }
22
22
  input_html_options[:type] = 'text'
@@ -0,0 +1,5 @@
1
+ class PgTrgm < ActiveRecord::Migration[7.1]
2
+ def change
3
+ enable_extension "pg_trgm"
4
+ end
5
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.0.8-alpha.73'
4
+ VERSION = '7.0.8-alpha.74'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.8.pre.alpha.73
4
+ version: 7.0.8.pre.alpha.74
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso
@@ -514,6 +514,20 @@ dependencies:
514
514
  - - "~>"
515
515
  - !ruby/object:Gem::Version
516
516
  version: 1.2.14
517
+ - !ruby/object:Gem::Dependency
518
+ name: pg_search
519
+ requirement: !ruby/object:Gem::Requirement
520
+ requirements:
521
+ - - "~>"
522
+ - !ruby/object:Gem::Version
523
+ version: 2.3.6
524
+ type: :runtime
525
+ prerelease: false
526
+ version_requirements: !ruby/object:Gem::Requirement
527
+ requirements:
528
+ - - "~>"
529
+ - !ruby/object:Gem::Version
530
+ version: 2.3.6
517
531
  - !ruby/object:Gem::Dependency
518
532
  name: vcr
519
533
  requirement: !ruby/object:Gem::Requirement
@@ -1004,6 +1018,7 @@ files:
1004
1018
  - pg_engine/db/migrate/20240314114503_remove_hash_ids.rb
1005
1019
  - pg_engine/db/migrate/20240428152916_create_mensaje_contactos.rb
1006
1020
  - pg_engine/db/migrate/20240506194106_create_emails.rb
1021
+ - pg_engine/db/migrate/20240517174821_pg_trgm.rb
1007
1022
  - pg_engine/db/seeds.rb
1008
1023
  - pg_engine/lib/pg_engine.rb
1009
1024
  - pg_engine/lib/pg_engine/configuracion.rb