Coder Social home page Coder Social logo

Comments (7)

nicovak avatar nicovak commented on August 16, 2024 1

It should works, I never had any issue on It. Have you configured your parent's model first ?

eg: https://github.com/rollincode/rollinbox/blob/master/app/models/concerns/rails_admin/parameter_admin.rb

from rails_admin_theme.

mmalek-sa avatar mmalek-sa commented on August 16, 2024

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

from rails_admin_theme.

nicovak avatar nicovak commented on August 16, 2024

Can you show your Template config please ?

from rails_admin_theme.

mmalek-sa avatar mmalek-sa commented on August 16, 2024

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

from rails_admin_theme.

nicovak avatar nicovak commented on August 16, 2024

Can you try with this:

config.model Template do
    navigation_label 'Template'
end

from rails_admin_theme.

mmalek-sa avatar mmalek-sa commented on August 16, 2024

Very cool! It works great! Thanks a ton. Sorry to waste your time I thought 'navigation_label' is optional.

from rails_admin_theme.

nicovak avatar nicovak commented on August 16, 2024

You'r welcome, I guess I already had a similar issue. Don't worry, I'm happy to help, happy coding ;)

from rails_admin_theme.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.