Aura Aura Models

Models

Models.

Finding models

Aura.models returns a Models instance, which is enumerable.

Aura.models    #=> #<Aura::Models>
Aura.models.map { |m| m.name }

Find by name

Use get (Aura.models) or Ruby's const_get.

Aura.models.get('contact_form')       #=> ContactForm
Aura.models.const_get(:ContactForm)   #=> ContactForm

Class methods

  • all Returns an array of all model classes.
  • get Returns a given model.
  • reload! Reloads models