Serialized Hash field and Simple Form

后端 未结 4 1130
不思量自难忘°
不思量自难忘° 2020-12-09 19:39

I have the following.

class Page < ActiveRecord::Base
  belongs_to :category
  serialize :fields
end

The value of fields wi

4条回答
  •  再見小時候
    2020-12-09 20:28

    Here is a solution you could easily adapt to your problem :

    https://gist.github.com/2157877

    Keeps the form super-clean and keeps the normal behaviour of an active model (nothing to add in your controller).

    Cheers !

提交回复
热议问题