I have a model called user. I want to show the password field just on the create page, not the edit one.
ActiveAdmin.register User do
form do |f|
f.inputs "User Details" do
f.input :first_name
f.input :last_name
f.input :email
if f.object.new_record?
f.input :password
end
end
f.buttons
end
end
This is what I tried but using .new_record? function all my fields disappear from the edit page.
Any ideas?
The solution was to use a partial.