阅读背景:

为什么Rails拒绝使用我的模型(基于SQL视图)?

来源:互联网 

I've create a view in MySQL which corresponds to some reports I'm generating (sums grouped by month, year with a roll up). The view has 3 columns (year, month, total). View/Table name is "report_monthly". I know I can use raw sql via connection().select_all(...) but I'd like to create an ActiveRecord for this table.I've create a view in MySQL which corresponds t




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: