I am using devise and the rails_admin gem. I want to add drop down in the from filed role of the rails_admin dashboard. I copied some code from internet to do so, but when i add this code, only the role field comes with the drop. Other input that is filed is not shown in the rails_admin dashboard.
User.rb
rails_admin do
create do
field :role , :enum do
enum do
[['admin','admin'],['user','user']]
end
end
end
end
Anybody knows why other users form filed is not shown in rails_Admin Dashboard after adding above code.
It should be edit not create, like this
rails_admin do
edit do
field :role , :enum do
enum do
[['admin','admin'],['user','user']]
end
end
end
end