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

Add back changes that fix deprecation warning related to autoloading in Rails 6 #255

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Aug 10, 2020

  1. Call sorcery config block where it is defined

    [Sorcery#227]
    
    Before this commit sorcery config block was saved into a variable and
    called after including `Sorcery::Controller` into `ActionController::Base`
    (in the included block). In Sorcery#209 the initialization code was changed to
    include `Sorcery::Controller` into `ActionController::Base` after loading
    action controller (in the onload block) to fix deprecation warning
    related to autoloading. After this change calling the user model in the
    rails development console started to fail with "To use reset_password
    submodule, you must define a mailer" error (Sorcery#227), because sorcery
    config block was not called (calling the user model doesn't load action
    controller) and `::Sorcery::Controller::Config.user_config` was nil
    
    Because of this issue changes in Sorcery#209 have been reverted (Sorcery#234)
    
    There is no need to delay calling sorcery config block until
    `Sorcery::Controller` is included into `ActionController::Base`
    
    This commit changes the code to call sorcery config where it is defined.
    It will allow to apply changes in Sorcery#209 to fix deprecation warning from
    autoloading
    Hirurg103 committed Aug 10, 2020
    Configuration menu
    Copy the full SHA
    c9d48c5 View commit details
    Browse the repository at this point in the history
  2. Add back changes that fix deprecation warning related to autoloading …

    …in Rails 6
    
    [Sorcery#209]
    
    Deprecation warning "Initialization autoloaded the constants
    ActionText::ContentHelper and ActionText::TagHelper." has been fixed
    in Sorcery#209, but then reverted because of "To use reset_password submodule,
    you must define a mailer" error occurring when calling the user model in
    the rails development console (Sorcery#227)
    
    c9d48c5 allows to add back changes from Sorcery#209 that fix the warning
    without breaking the user model in the rails development console
    Hirurg103 committed Aug 10, 2020
    Configuration menu
    Copy the full SHA
    6fa3214 View commit details
    Browse the repository at this point in the history