jeudi 21 mai 2015

ActiveRecord - prevent DB connection when calling Model.new

Every time I call Model.new, and before calling .save, ActiveRecord seems to get a database connection (which might make sense since it needs to get the field names).

How do I prevent this from happening? I don't intend to save the model into the database. I'm just creating it and then passing it to other functions.

Aucun commentaire:

Enregistrer un commentaire