Skip to content
This repository

Admin configuration as a model class method? #1402

michaek opened this Issue · 1 comment

1 participant

Michael Hellein
Michael Hellein

Is it possible (or desirable) to add RailsAdmin configuration to a model class? The reason I ask is that it seems appealing to be able to do something like:

class ExampleModel < AnotherModel
  def self.rails_admin(config)
      ... (some config)...

A subclass could inherit and modify its superclass's configuration, or an extended module could add some configuration in a method chain, and so on. I still don't know enough about the internals of RailsAdmin to know whether that's practical, or even sensible.


Michael Hellein

After looking at the code a bit, it seems like that's close to how things currently work, but there's a class macro that you pass a block. See: #638 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.