How to customize Rails 3 STI column name

后端 未结 4 1896
旧巷少年郎
旧巷少年郎 2020-12-31 11:08

I have a class named Post:

class Post < ActiveRecord::Base
end

I have a class named Question that inheriting f

4条回答
  •  天涯浪人
    2020-12-31 11:22

    There actually is a way, as with all things. You can override the find_sti_class method to look for your type based on an integer.

提交回复
热议问题