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

Use alias_method instead of alias_method_chain #123

Conversation

jonatack
Copy link

@jonatack jonatack commented Apr 2, 2015

This is probably not an ideal implementation, but the idea is to get the ball rolling on upgrading to Module#prepend, since alias_method_chain is deprecated in Rails 5.0.

A simpler migration path would be to replace alias_method_chain with two
alias_methods.

WDYT?

@gsamokovarov
Copy link
Collaborator

Hey @jonatack, thank you for the PR. Can we go with two alias/alias_method calls as I wanna support Rails 4 for a while after 5 is released. It would also reduce the conditions and the duplication :)

@jonatack
Copy link
Author

jonatack commented Apr 2, 2015

Got it.

since alias_method_chain is deprecated now in Rails master targeting
5.0.0.

Use alias_method instead of alias_method_chain

since alias_method_chain is deprecated now in Rails master targeting
5.0.0.
@jonatack jonatack force-pushed the use-prepend-instead-of-alias-method-chain branch from 2b8a74a to 71ca0cb Compare April 2, 2015 10:20
@jonatack
Copy link
Author

jonatack commented Apr 2, 2015

Updated and squashed.

@jonatack jonatack changed the title Use prepend when defined instead of alias_method_chain Use alias_method instead of alias_method_chain Apr 2, 2015
@gsamokovarov
Copy link
Collaborator

Thanks!

gsamokovarov added a commit that referenced this pull request Apr 2, 2015
…thod-chain

Use alias_method instead of alias_method_chain
@gsamokovarov gsamokovarov merged commit 100c9be into rails:master Apr 2, 2015
@jonatack jonatack deleted the use-prepend-instead-of-alias-method-chain branch April 2, 2015 10:46
@jonatack
Copy link
Author

jonatack commented Apr 2, 2015

Thank you! The original PR using Module#prepend with travis-ci passing is here if it can be useful later on.

@jonatack jonatack restored the use-prepend-instead-of-alias-method-chain branch April 5, 2015 03:55
@jonatack jonatack deleted the use-prepend-instead-of-alias-method-chain branch April 5, 2015 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants