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
Delegate to_sentence
and to_fomatted_s
to records
#27904
Delegate to_sentence
and to_fomatted_s
to records
#27904
Conversation
r? @matthewd (@rails-bot has picked a reviewer for you, use r? to override) |
@@ -37,7 +37,7 @@ def inherited(child_class) | |||
# for each different klass, and the delegations are compiled into that subclass only. | |||
|
|||
delegate :to_xml, :encode_with, :length, :collect, :map, :each, :all?, :include?, :to_ary, :join, | |||
:[], :&, :|, :+, :-, :sample, :reverse, :compact, :in_groups, :in_groups_of, | |||
:[], :&, :|, :+, :-, :sample, :reverse, :compact, :in_groups, :in_groups_of, :to_sentence, :to_formatted_s, :to_xml, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe wrap to next line?
bc7cf95
to
5aa368b
Compare
@simi Thank you. And I mistakenly added |
to_sentence
, to_fomatted_s
and to_xml
to records
to_sentence
and to_fomatted_s
to records
@kenta-s Can you add a test to confirm the new behavior? Thanks! |
Should be enough to add new delegations to this array in test suite. |
5aa368b
to
5d50962
Compare
done :) |
…gation-from-ar-relation Delegate `to_sentence` and `to_fomatted_s` to `records`
Backported to 5-0-stable in 28a1bdd |
Fix: #27901