How to create ActiveRecord tableless Model in Rails 3

后端 未结 7 2243
终归单人心
终归单人心 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:51

    Don't inherit your class from ActiveRecord::Base.
    If a model inherits from ActiveRecord::Base as you would expect a model class to,it wants to have a database back-end.

提交回复
热议问题