Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

234
Vistas
How to cause rerender of 2 components linked with database?

Suppose I have 2 components which are not linked (by props) A and B. They are linked but by the database, A has a button which allows it to change the database. And I want B to rerender (not all the page) when the database changes, is that possible?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

&. is called a safe navigation operator which was introduced in ruby 2.3, it works similar to the try! method and returns nil if the object is nil else returns the attribute value of the object.

object = OpenStruct.new(a: 1)
object&.a
# => 1 

object = nil
object&.a
# => nil 

object.a
# Traceback (most recent call last):
#         1: from (irb):21
# NoMethodError (undefined method `a' for nil:NilClass)

You can see in the above example the difference when we are calling a on an object with and without &. operator.

Refer SO answer for more details on it.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda