How to get ActiveAdmin to work with Strong Parameters?

后端 未结 6 1614
鱼传尺愫
鱼传尺愫 2020-12-13 02:01

Update: this question was asked before there was a solution for it already in ActiveAdmin. As Joseph states, the ActiveAdmin documentation now contains this information,

6条回答
  •  情深已故
    2020-12-13 02:42

    You can also use permit_params as follows:

    ActiveAdmin.register Resource do
    
      permit_params do
        %i(first_name last_name)
      end
    
      index pagination_total: false do
        column :id
        column :first_name
        column :last_name
        actions
      end
    end
    

提交回复
热议问题