instances.ejs
469 Bytes
In order to create instances of defined classes just do it as follows:
<pre><%- koala(".js", partial("code/instances/models-1.ejs")) %></pre>
To save it in the database use the save method and pass a callback to it, if needed:
<pre><%- koala(".js", partial("code/instances/models-2.ejs")) %></pre>
Now lets change some values and save changes to the database... There are two ways to do that:
<pre><%- koala(".js", partial("code/instances/models-3.ejs")) %></pre>