How does one use ActiveRecord with views and user-defined functions in MySQL?
I'm wondering what the proper way开发者_如何转开发 to do these two things is, if there is any.
ActiveRecord isn't really designed with views and stored procs in mind. It works best with fresh databases and it really expects the logic to stay in Ruby. If you have to work against an older database, then you can Google using Rails with legacy databases. In addition, one of the other ORMs (DataMapper, maybe something else) may work better with legacy databases
精彩评论