Jean byroot Boussier
Jean byroot Boussier
After thinking more about this, I think we should provide an `Arel.integer() / Arel.float()` helper to mark these values as safe, which would essentially be the `SafeInteger` workaround.
I really can't figure out how legit this `builder` test is. To me it seems like it rely on a weird behavior of Action View's `render` helper. In "classic" ERB...
Actually I may have found a solution. We could do the "capture" thing as part of the `Erubi` `preamble / postamble`. This way other handlers wouldn't see any semantic change.
> I did one take on this already at #45612, but there was no interest :(. This is pointing to the current PR.
I'm gonna assume you meant https://github.com/rails/rails/pull/39874
Sure. It might also be a good idea to add @simi as co-author on that new PR, as his original one wasn't noticed and got stale for no valid reason....
> so I can just push it in this, what do you think? Sure, go ahead. While we're at it, policy is only one commit per PR unless very special...
Well, if we no longer add the feature the test should be removed. You screenshot is a bit too truncated for me to really answer your question though. I suggest...
> should I push it here instead and close the new one? It would be best yes, this way we have the full PR discussion in case we git blame...
```diff diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb index a0d9c3d878f..e1bc3b6e6ee 100644 --- a/activerecord/lib/active_record/relation/query_methods.rb +++ b/activerecord/lib/active_record/relation/query_methods.rb @@ -1854,11 +1854,13 @@ def transform_select_hash_values(fields) case columns_aliases when Hash columns_aliases.map do |column, column_alias| - arel_column("#{key}.#{column}", &:itself).as(column_alias.to_s) +...