How to create ActiveRecord tableless Model in Rails 3

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

    For Rails >= 3.2 there is the activerecord-tableless gem. Its a gem to create tableless ActiveRecord models, so it has support for validations, associations, types.

    When you are using the recommended way to do it in Rails 3.x there is no support for association nor types.

提交回复
热议问题