rails/activerecord/lib
Alex a22b942fb3 Disallow id as an enum value in Active Record
Fixes https://github.com/rails/rails/issues/48524

The test case in the issue breaks because `value.respond_to?(:id)` returns true [here](51f2e2f80b/activerecord/lib/active_record/relation/predicate_builder.rb (L58)). This effectively adds a default scope to queries where it shouldn't.

There might be a way to fix this in Active Record but I'd be surprised if nothing else breaks from defining `id` instance and class methods. I think it is simpler to not allow it as a value since it really should be treated as a reserved method.
2023-06-20 11:22:30 +10:00
..
active_record Disallow id as an enum value in Active Record 2023-06-20 11:22:30 +10:00
arel Adds Arel::Nodes::Cte for use in WITH expressions 2023-05-24 19:19:21 -04:00
rails/generators Simplify the implementation to register the correct source_path for the migration template 2023-05-24 22:54:12 +00:00
active_record.rb Implement ActiveRecord.disconnect_all! to close all connections 2023-05-19 13:19:31 +02:00
arel.rb Fix a code block in the Arel documentation 2023-05-06 18:57:12 -07:00