how to keep a hash value in the table column in rails

前端 未结 3 1199
我在风中等你
我在风中等你 2021-02-04 09:14

i am very new to rails . I am having a table holding all users basic information like

users(id,name,email) now i am trying to keep some additional infor

3条回答
  •  醉酒成梦
    2021-02-04 09:49

    Another alternative would be to use JSON fields on the model. The migration would have something like:

    create_table :events do |t|
      t.json 'payload'
    end
    

提交回复
热议问题