Skip to content

config.parent_controller setting does not work #2790

@grillermo

Description

@grillermo

On my project the config/initializers/rails_admin.rb file added

config.parent_controller = '::MyBaseController'

And rails admin ignores it, if i change directly the lib/rails_admin/config.rb file and hardcode this

@parent_controller = '::MyBaseController

It works, my conclusion is that this mechanism

class ApplicationController < Config.parent_controller.constantize

Doesnt work.
I tested it using a before_action filter and i could confirm that doing

self.class.superclass

Does not return the right class when using the config approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions