Rails namespaces form fields for the data model, in this case BunnyData. In order for the form to be pre-filled, any fields provided must also include a namespace. As an example:
ActiveAdmin.register Post do form do |f| f.inputs "Post Details" do f.input :user f.input :title f.input :content end f.actions end end
Fields can be pre-populated by passing the hash to the path helper.
link_to 'New Post', new_admin_post_path(:post => { :user_id => user.id })
which generates the next path and sets the form field.
/admin/posts/new?post[user_id]=5
In the case of BunnyData, it may be slightly different due to single and multiple data forms. But this can be verified by checking the generated HTML to find the name attribute of the inputs.
source share