Skip to content

Delete AS::Dependencies.(safe_)constantize - #43058

Merged
fxn merged 2 commits into
mainfrom
del-private-constantize
Aug 20, 2021
Merged

Delete AS::Dependencies.(safe_)constantize#43058
fxn merged 2 commits into
mainfrom
del-private-constantize

Conversation

@fxn

@fxn fxn commented Aug 20, 2021

Copy link
Copy Markdown
Member

(This is part of the cleanup in ActiveSupport::Dependencies due to the deletion of classic.)

The methods constantize and safe_constantize of ActiveSupport::Dependencies are private. They have nothing to do with autoloading, just forward to the inflector. They were there for historical reasons, but today we no longer need them.

The public interface is in String. So

model_name.constantize

instead of

ActiveSupport::Dependencies.constantize(model_name)

The majority of the framework already did this, there were only a few occurrences.

@fxn
fxn merged commit e9f38a1 into main Aug 20, 2021
@fxn
fxn deleted the del-private-constantize branch August 20, 2021 16:25
stephenbinns added a commit to gocardless/coach that referenced this pull request Sep 17, 2021
This is removed in rails 7 due to the classic autoloader being removed -
see rails/rails#43058 for details.
stephenbinns added a commit to gocardless/coach that referenced this pull request Sep 17, 2021
This is removed in rails 7 due to the classic autoloader being removed -
see rails/rails#43058 for details.
stephenbinns added a commit to gocardless/coach that referenced this pull request Sep 17, 2021
This is removed in rails 7 due to the classic autoloader being removed -
see rails/rails#43058 for details.
stephenbinns added a commit to gocardless/coach that referenced this pull request Sep 17, 2021
This is removed in rails 7 due to the classic autoloader being removed -
see rails/rails#43058 for details.
tagliala added a commit to tagliala/activeadmin that referenced this pull request Dec 14, 2021
tagliala added a commit to tagliala/activeadmin that referenced this pull request Dec 14, 2021
tagliala added a commit to tagliala/activeadmin that referenced this pull request Dec 14, 2021
tagliala added a commit to tagliala/activeadmin that referenced this pull request Dec 17, 2021
tagliala added a commit to tagliala/activeadmin that referenced this pull request Dec 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant