I have one model that I want to hide from Navigation on the left of rails_admin but it does not work. (I still want to access it, just want to hide it from the panel, so exclude does not count)
I have tried all three kind of code below but it does not work:
config.model 'Document' do
visible false
end
from here: https://github.com/sferik/rails_admin/wiki/Navigation
As well as the code:
config.model 'Document' do
hide_from_navigation
end
from here: http://www.verious.com/code/foca/rails_admin/
As well as the code:
config.model 'Document' do
navigation do
visible = false
end
end
Can someone explain for me why ?
I have already restart the server before checking it.
Thanks!
I solved it adding the following line of code in config/initializers/rails_admin.rb:
config.excluded_models= [Document]
Instead of:
config.excluded_models = ['Document']
in your app/config/initializers/rails_admin.rb file you can add something like this and only include the models you want to show up in your navigation --
config.included_models = [ User, Region, Newsletter, Article ]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With