Initializer for compound 1.1.5-16

This commit is contained in:
Anatoliy Chakkaev 2013-03-11 17:21:05 +08:00
parent 8ca6d2e0ba
commit 6f1c9b2034
1 changed files with 13 additions and 4 deletions

View File

@ -18,10 +18,19 @@ exports.init = function (rw) {
rw.orm = {Schema: exports.Schema, AbstractClass: exports.AbstractClass}; rw.orm = {Schema: exports.Schema, AbstractClass: exports.AbstractClass};
} }
var railway = './lib/railway'; var railway = './lib/railway';
if (rw.version > '1.1.5-15') {
rw.on('after routes', initialize);
} else {
initialize();
}
function initialize() {
try { try {
var init = require(railway); var init = require(railway);
} catch (e) {} } catch (e) {}
if (init) init(rw); if (init) init(rw);
}
}; };
exports.__defineGetter__('version', function () { exports.__defineGetter__('version', function () {