How to create ActiveRecord tableless Model in Rails 3

后端 未结 7 2241
终归单人心
终归单人心 2020-12-30 03:05

I am trying to create a Active Record tableless Model. My user.rb looks like this

class User < ActiveRecord::Base

  class_inheritable_accessor :columns

         


        
7条回答
  •  生来不讨喜
    2020-12-30 03:41

    Just remove:

    class_inheritable_accessor :columns
    

    And it should work, even with associations just like a model with a table.

提交回复
热议问题