Skip to content

[sp1] Error en observe_field (#38)

En: Administracion > Proyectos.

Al editar y dar de alta un nuevo proyecto modificamos el observe_field de la vista del formuario:

app/views/proyecto/_formulario.html.erb

 14           <%= observe_field( "proyecto_moneda_id" , :url => {:action => "libro_cambio_moneda"},
 15                             with: [{params_name: 'moneda_id', value: 'proyecto_moneda_id'},
 16                               {params_name: 'implementador_id', value: 'proyecto_gestor_id'},
 17                               {params_name: 'proyecto_id', value: (@proyecto ? @proyecto.id.to_s : "")}]) %>

Al cambiar una moneda el sistema da un error de tipo:

jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:1542 Uncaught Error: Syntax error, unrecognized expression: #
    at Function.Sizzle.error (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:1542)
    at Sizzle.tokenize (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:2194)
    at Sizzle.select (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:2621)
    at Function.Sizzle [as find] (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:846)
    at jQuery.fn.init.find (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:2874)
    at new jQuery.fn.init (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:2984)
    at jQuery (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:140)
    at Object.<anonymous> (herramientas_gong.self-22a04337b5abbb48d39f45a3661f55504be69b96dfe88167ca828e8644484715.js?body=1:228)
    at Function.each (jquery3.self-5af507e253c37e9c9dcf65064fc3f93795e6e28012780579975a4d709f4074ad.js?body=1:355)
    at withValorField (herramientas_gong.self-22a04337b5abbb48d39f45a3661f55504be69b96dfe88167ca828e8644484715.js?body=1:226)

Parece ser que al pasarle en "value" un valor y no un identificador el sistema no funciona.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information