Happy new year (yet again) ! And a Friday the 13th 👻
Thanks to all the 27 contributors, in particular to the 4 people who contributed for the first time. Keep up the good work!
Here are the most relevant changes to Rails master for this week.
Since top-level constant lookup has been removed on Ruby 2.5, Rails takes care of relevant changes on its side, so that we rely on properly scoped constants, instead of relying on fallback lookup.
If a process is forked more than once, the Active Record connection pool was grabbing the oldest connection specification for a process, and not the most recent one.
This issue is not seen for single processes, but if you are forking the process multiple times, the wrong specification will be returned and incorrect connection will be used.
This change fixes the issue by reversing the list of specification names so we can grab the most recent one rather than the oldest.
Previously when using time travel methods, travel_to, etc, and calling
now on a subclass of e.g.
Time, it would return an instance of
Time instead of returning an instance of the subclass.
This change fixes the way we return the instance, so that we always return using the correct class.
Previously the following code may fail or succeed depending on the current time.
ActiveSupport::Duration.parse(2.months.iso8601) == 2.months ActiveSupport::Duration.parse(3.years.iso8601) == 3.years
This change fixes the inconsistent parsing so that this comparison no longer fails.
The idea of
class_name as an option of reflection is that passing a string would allow us to lazy autoload the class.
Using the class directly, with something like
belongs_to :client, class_name: Customer
is eagerloading models more than necessary and creating possible circular dependencies.
This option is now deprecated, pass strings of the class names instead.
That’s it from Vipul . I hope you enjoyed this issue.
If you haven’t already, start working on those RailsConf proposals, you have only 6 days left to submit a good talk!