Skip to content

Remove unneeded check on ActiveModel#attribute_aliases - #772

Merged
sunny merged 3 commits into
RubyMoney:mainfrom
wwahammy:remove-attribute_aliases-check
May 27, 2026
Merged

Remove unneeded check on ActiveModel#attribute_aliases#772
sunny merged 3 commits into
RubyMoney:mainfrom
wwahammy:remove-attribute_aliases-check

Conversation

@wwahammy

@wwahammy wwahammy commented Mar 29, 2026

Copy link
Copy Markdown
Contributor

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!

@sunny
sunny merged commit e585a9d into RubyMoney:main May 27, 2026
8 checks passed
@wwahammy
wwahammy deleted the remove-attribute_aliases-check branch May 27, 2026 18:23
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