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

Deprecated ActiveSupport::Dependencies.constantize fix #5397

Merged

Conversation

strobilomyces
Copy link
Contributor

ActiveSupport::Dependencies.constantize(model_name) was deprecated in rails/main in favor of model_name.constantize

@t27duck
Copy link

t27duck commented Sep 12, 2021

Can confirm this branch works when using an app based off of Rails main.

lunaisnotaboy referenced this pull request in lunaisnotaboy/devise Sep 13, 2021
@TheRusskiy
Copy link

tagging @carlosantoniodasilva @tegon
sorry for the extra noise, but this issue seems important in light of the upcoming Rails 7 release

@carlosantoniodasilva
Copy link
Member

carlosantoniodasilva commented Sep 17, 2021

Appreciate the ping. I'm well aware of the Rails 7 release timeline (final is still weeks/months away) and that Devise is currently not working with it at all, this being part of the necessary changes. (Turbo being another key piece.) I was waiting for things to play out further before making any changes to Devise to accommodate Rails master (watching things from a distance), plus I haven't had much time and energy to be honest. In any case, now that the alpha was released it does make it a bit more pressing, I'll find some time to get things lined up on this side soon. Thanks.

@cloudsbird
Copy link

cloudsbird commented Sep 21, 2021

For a while due to this PR not yet merged, if you interest to use devise in rails 7 you can add / change the line in Gemfile to be:

gem 'devise', git: 'https://github.com/strobilomyces/devise', branch: 'patch-1'

Edited:

gem 'devise', git: 'https://github.com/heartcombo/devise', branch: 'main'

pmor added a commit to pmor/devise that referenced this pull request Sep 22, 2021
@collimarco
Copy link

collimarco commented Sep 25, 2021

It would be really useful to have this merged... ;) we're starting a new project now and we would like to use Rails 7 directly.

@excid3
Copy link
Contributor

excid3 commented Oct 3, 2021

@rafaelfranca if you get a chance, this PR fixes the issue for Rails 7 and would be great to have merged soon. 👍

@carlosantoniodasilva
Copy link
Member

I am going to work on this early next week.

@excid3
Copy link
Contributor

excid3 commented Oct 3, 2021

Thanks @carlosantoniodasilva! If there's anything we can do to help, let us know. 👍

@carlosantoniodasilva carlosantoniodasilva changed the base branch from master to ca-rails-main October 7, 2021 20:25
@carlosantoniodasilva carlosantoniodasilva merged commit a0ccc1c into heartcombo:ca-rails-main Oct 7, 2021
@carlosantoniodasilva
Copy link
Member

I'm merging this to a separate branch for the time being, and will get it into master soon. Thanks @strobilomyces and everyone else here.

@carlosantoniodasilva
Copy link
Member

This is now on master, thanks again.

Side note: there's one warning triggered by the tests that I have to look into, I think it's Rails related, I'll circle back on it.

@cloudsbird
Copy link

cloudsbird commented Oct 8, 2021

Yeay Due to It is merged Already, for Rails 7 change your gemfile now to

gem 'devise', git: 'https://github.com/heartcombo/devise', branch: 'main'

Note: I have test it and run perfectly in Rails 7 Thanks !!!
I have add the readme in #5407

@tabishiqbal
Copy link

I believe it's suppose to be:
gem 'devise', git: 'https://github.com/heartcombo/devise', branch: 'main'

@cloudsbird
Copy link

thanks updated!

@shruthi1983
Copy link

shruthi1983 commented Dec 29, 2021

undefined method `user_url' for #Devise::RegistrationsController:0x0000000000ef10
if options.empty?
recipient.public_send(method, *args)
else
recipient.public_send(method, *args, options)
end
am getting this error even added this merge,any solution? thanks in advance....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants