Helpers

Demo Avatar

Demo Avatar

A fun helper that makes rendering placeholder avatars easy.

For testing purposes and demos we leverage a homemade helper demo_avatar_url. This can be passed two options id and variant that returns an absolute URL sourcing the website https://randomuser.me.

The demo_avatar_url helper is accessbile automatically assuming the Rails UI gem is installed. No setup required.

demo_avatar_url(id:, variant:)

Options

  • id

    A number between 1-100.

  • variant

    men, women

Demo Avatar

Demo Avatar Demo Avatar Demo Avatar

On this page