From d5758ec8bed33f2f30e2c3d9a515dec81a98cbe9 Mon Sep 17 00:00:00 2001 From: Anatoliy Chakkaev Date: Mon, 21 Jan 2013 20:29:41 +0700 Subject: [PATCH] Added schema::model::set for railway --- lib/railway.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/railway.js b/lib/railway.js index 8d2ae77c..d8a54abe 100644 --- a/lib/railway.js +++ b/lib/railway.js @@ -209,6 +209,16 @@ function prepareContext(models, railway, app, defSchema, done) { if (cname) settings[cname].table = name; }; + /** + * Set configuration param + * + * @param name - name of param. + * @param value - value. + */ + ctx.set = function (name, value) { + if (cname) settings[cname][name] = value; + }; + /** * If the Schema has additional types, add them to the context * e.g. MySQL has an additional Point type