Skip to content

Remove unneeded check on ActiveModel#attribute_aliases#772

Open
wwahammy wants to merge 2 commits intoRubyMoney:mainfrom
wwahammy:remove-attribute_aliases-check
Open

Remove unneeded check on ActiveModel#attribute_aliases#772
wwahammy wants to merge 2 commits intoRubyMoney:mainfrom
wwahammy:remove-attribute_aliases-check

Conversation

@wwahammy
Copy link
Copy Markdown
Contributor

@wwahammy wwahammy commented Mar 29, 2026

As far as I can tell, ActiveModel#attribute_aliases has been in Rails since at least version 6 so there shouldn't be a reason to check whether the method is on the record class. The removed comment implies it was added in Rails 4 but who knows? In regards to the current supported versions: here's the file included in on Rails 7 and here's the file for Rails 8.

This removes the unnecessary check.

@wwahammy wwahammy marked this pull request as ready for review March 29, 2026 19:15
@wwahammy wwahammy changed the title Remove unneeded check on attribute_aliases Remove unneeded check on ActiveModel#attribute_aliases Mar 29, 2026
@yukideluxe
Copy link
Copy Markdown
Member

thanks!

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.

3 participants