0

I've create and run my vanity migrations and I can see the resulting tables in schema.rb and the rails console:

ActiveRecord::Base.connection.tables
 => ["schema_migrations", "pages", "users", "areas", "roles", "assignments", "categories", "heuristics", "references", "footnotes", "products", "orders", "vanity_metrics", "vanity_metric_values", "vanity_experiments", "vanity_conversions", "vanity_participants"] 

Why then has it not created vanity_experiments.rb and similar files in app/models?

I understand vanity will be using Redis not my PostgreSQL to store the data, but Rails still maps each table to a model, right?

steven_noble
  • 4,133
  • 10
  • 44
  • 77

1 Answers1

1

Vanity supports multiple adapters, including ActiveRecord. My guess is that the generator creates these migrations in case you're using the ActiveRecord adapter.

See http://vanity.labnotes.org/configuring.html for more info.

Gabe Hollombe
  • 7,847
  • 4
  • 39
  • 44
  • Yup - no need for the migrations if you're using a non-AR adapter. (If you were using the AR adapter, then the models live in the gem source, not in `app/models/`.) – phillbaker Mar 22 '14 at 15:05