Closed mmalek-sa closed 6 years ago
It should works, I never had any issue on It. Have you configured your parent's model first ?
I was suspicious at first regarding my own code, but then I just switched to default theme and it worked so I thought maybe it's a bug with theme. This is what I have in my config/initializers/rails_admin.rb which works with default theme:
config.model TemplateVersion do
parent Template
edit do
field :version
field :template
field :content, :ck_editor
field :active
field :language
end
end
Can you show your Template
config please ?
It's an open source project, You can check the whole config here:
https://github.com/DataRights/MAPPED/blob/develop/config/initializers/rails_admin.rb
I'm not doing any config on Template model. I tested adding an empty config as well, but that didn't help either.
config.model Template do
end
config.model User do
end
config.model TemplateVersion do
parent Template
edit do
field :version
field :template
field :content, :ck_editor
field :active
field :language
end
end
Can you try with this:
config.model Template do
navigation_label 'Template'
end
Very cool! It works great! Thanks a ton. Sorry to waste your time I thought 'navigation_label' is optional.
You'r welcome, I guess I already had a similar issue. Don't worry, I'm happy to help, happy coding ;)
From rails admin wiki: https://github.com/sferik/rails_admin/wiki/Navigation
You should be able to group models under parent models. This feature doesn't work with rollincode/rails_admin_theme. This is really nice feature when you have lots of models.