pg_rails 7.0.8.pre.alpha.66 → 7.0.8.pre.alpha.68
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aadbece035188e276906c70783eedfd7fecfd18e3de9ea61294bc94139c7ae26
|
4
|
+
data.tar.gz: f996ec7231a046c9658d0db34dfed71257cf7fe8781e84cc7b337703a994018b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93bf6af563e8835fcc7c936ad4ba2c77b3d0db0ddd298701c649e82d41eea0a22c6a86cd3fb1af3d2174d00fcf1a5afd986beaf4332b74cde27d8bd6965cfbe2
|
7
|
+
data.tar.gz: 116cd59c81fa16ba0bc223182556029a149fb4545b3d61a1f875e177a5a3517978cfa627c52cce7c009ca3920be85d228c9cc5d03f3417fb1bede88f4358eca7
|
@@ -5,8 +5,9 @@ class PgFormBuilder < SimpleForm::FormBuilder
|
|
5
5
|
include PgEngine::ErrorHelper
|
6
6
|
|
7
7
|
def default_prefix(attribute_name)
|
8
|
-
|
9
|
-
|
8
|
+
attribute_name = attribute_name.to_s.sub /_id\z/, ''
|
9
|
+
at_name_human = object.class.human_attribute_name(attribute_name).downcase
|
10
|
+
"#{articulo(attribute_name)} #{at_name_human}"
|
10
11
|
end
|
11
12
|
|
12
13
|
def articulo(attribute_name)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Controller } from '@hotwired/stimulus'
|
2
|
+
|
3
|
+
// Connects to data-controller="clear-timeout"
|
4
|
+
export default class extends Controller {
|
5
|
+
connect () {
|
6
|
+
const timeoutId = parseInt(this.element.dataset.timeoutId)
|
7
|
+
clearTimeout(timeoutId)
|
8
|
+
console.log(`clearedTimeout: ${timeoutId}`)
|
9
|
+
this.element.remove()
|
10
|
+
}
|
11
|
+
}
|
@@ -4,8 +4,10 @@ import NavbarController from './navbar_controller'
|
|
4
4
|
import NestedController from './nested_controller'
|
5
5
|
import PgFormController from './pg_form_controller'
|
6
6
|
import FadeinOnloadController from './fadein_onload_controller'
|
7
|
+
import ClearTimeoutController from './clear_timeout_controller'
|
7
8
|
|
8
9
|
application.register('navbar', NavbarController)
|
9
10
|
application.register('nested', NestedController)
|
10
11
|
application.register('pg_form', PgFormController)
|
11
12
|
application.register('fadein_onload', FadeinOnloadController)
|
13
|
+
application.register('clear-timeout', ClearTimeoutController)
|
data/pg_rails/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.
|
4
|
+
version: 7.0.8.pre.alpha.68
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martín Rosso
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -1054,6 +1054,7 @@ files:
|
|
1054
1054
|
- pg_layout/app/javascript/config/cable_ready.js
|
1055
1055
|
- pg_layout/app/javascript/config/index.js
|
1056
1056
|
- pg_layout/app/javascript/controllers/application.js
|
1057
|
+
- pg_layout/app/javascript/controllers/clear_timeout_controller.js
|
1057
1058
|
- pg_layout/app/javascript/controllers/fadein_onload_controller.js
|
1058
1059
|
- pg_layout/app/javascript/controllers/index.js
|
1059
1060
|
- pg_layout/app/javascript/controllers/navbar_controller.js
|