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

Remove unused/useless constant aliases #953

Merged

Conversation

kamipo
Copy link
Contributor

@kamipo kamipo commented Aug 18, 2018

  • Remove unused constant aliases for ActiveRecord::Associations::ClassMethods::*

ActiveRecord::Associations::ClassMethods::* had already been moved to
ActiveRecord::Associations::* since Rails 3.1.

See rails/rails@b171b9e

  • Remove unused constant aliases for Arel::{InnerJoin,OuterJoin}

Arel::Nodes::{InnerJoin,OuterJoin} exists since Arel 2.2 still today.

https://github.com/rails/arel/blame/v9.0.0/lib/arel/nodes/inner_join.rb
https://github.com/rails/arel/blame/v9.0.0/lib/arel/nodes/outer_join.rb

  • Remove useless constant alias for JoinDependency

Originally it looks like for using shorter name in this file since
ActiveRecord::Associations::ClassMethods::JoinDependency was too long.

I think we can just use Polyamorous::JoinDependency existent alias.

  • Remove unused constant alias for JoinBase

JoinBase#active_record no longer exist since Rails 4.0.

See rails/rails#10151

kamipo added 4 commits August 18, 2018 17:25
…Methods::*`

`ActiveRecord::Associations::ClassMethods::*` had already been moved to
`ActiveRecord::Associations::*` since Rails 3.1.

See rails/rails@b171b9e
Originally it looks like for using shorter name in this file since
`ActiveRecord::Associations::ClassMethods::JoinDependency` was too long.

I think we can just use `Polyamorous::JoinDependency` existent alias.
`JoinBase#active_record` no longer exist since Rails 4.0.

See rails/rails#10151
@gregmolnar gregmolnar merged commit fd4396b into activerecord-hackery:master Aug 19, 2018
@gregmolnar
Copy link
Member

thank you @kamipo

@kamipo kamipo deleted the remove_unused_constant_aliases branch August 19, 2018 14:26
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.

2 participants