Access Models from OUTSIDE rails app
I am writing a JRuby rails app that uses mysql-backed models. Now, I need to update the models from OUTSIDE the app (via EventMachine / similar), so that the Controllers etc IN the rails app can get access to the f开发者_JAVA百科resh data.
So, is the Rails ORM available inside EventMachine? Will there be catastrophic consequences if I update the mysql tables from inside EventMachine (if the ORM is not available to me)?
You could always require 'config/environment.rb'
, that'll give you access to all the models.
精彩评论