Rails - Adding Custom Fields at runtime in ActiveRecord

后端 未结 3 1857
深忆病人
深忆病人 2021-02-03 12:55

You know how some bug trackers (and other software) allow you to add custom fields?

Typically this is done with a data structure that looks something like this:

3条回答
  •  北海茫月
    2021-02-03 13:08

    Take a look at the Friendly ORM. It allows you to work with mysql without a schema. It was inspired by this blog post about how Friendfeed uses mysql to store schemaless data.

    Friendly would replace ActiveRecord, although you can use ActiveRecord models next to Friendly models pretty easily.

提交回复
热议问题