Unable to find input class for json - handling JSON type in Active Admin

前端 未结 2 1808
忘了有多久
忘了有多久 2021-02-06 02:24

I have a JSON type in my model, which is coming from Postgres, the migration looks like:

create_table :people do |t|
  t.string :name
  t.json :links
end
         


        
2条回答
  •  生来不讨喜
    2021-02-06 03:17

    There is a gem for that: https://github.com/udacity/activeadmin_json_editor

    activeadmin_json_editor lets you edit JSONb fields with a structured field editor. The admins should understand the concept of a hash or array but apart from that, it works out of the box.

提交回复
热议问题