Skip to content

Instantly share code, notes, and snippets.

Fon FonMaestro

Block or report user

Report or block FonMaestro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Carto_BackEnd_test.md

Ejercicio 1:

  • 2 querys en total gracias al eager loading del preload
  • En la app de RoR se crearían scopes en modelos y Query Objects para encapsular las responsabilidades para evitar potenciales smells
users = User
	.select('users.id, users.name, users.created_at, COUNT(groups_users.group_id) AS count_groups')
	.joins('users LEFT OUTER JOIN groups_users ON users.id=groups_users.user_id')
You can’t perform that action at this time.