Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore 2.x config loading behavior #3492

Closed

Commits on Mar 10, 2022

  1. restore 2.x config loading behavior

    Attempt to restore 2.x config loading behavior where 1) per-model config blocks
    only evaluate after all the models are loaded and associations are defined
    while 2) initializer config block evaluates immediately so that routes are
    configured correctly.
    
    One remaining change compared to 2.x is RailsAdmin::Config#model no longer
    returns the model when given a block. With the removal of LazyModel in e4ae669
    it is tricky to both defer initialization and return the model class.
    
    Fixes railsadminteam#3490
    q3aiml committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    ec03eb6 View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2022

  1. maintain 3.x deferred initializer block config

    In 3.x the initializer config blocks are intentionally deferred to allow
    referencing model classes without quoting. Here is a first pass at keeping that
    behavior on top of ec03eb6. It could probably use a little cleanup but here's
    an idea of an approach for feedback.
    
    See
    railsadminteam#3492 (comment)
    for details.
    q3aiml committed Mar 25, 2022
    Configuration menu
    Copy the full SHA
    e2ec3b9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    00ac334 View commit details
    Browse the repository at this point in the history