Keep yourself up to date with our articles on Ruby on Rails, Ruby, Dart & Flutter.
25 January 2022
This or method was introduced in Rails 5, It returns a new ActiveRecord::Relation which is logical union or two relations....
21 January 2022
Descendants has been a part of Rails ActiveSupport::DescendantsTracker for quite a while. However, Class#subsclasses is recently introduced in Ruby 3.1...
21 January 2022
Ruby 3.1 adds Class#subclasses method, which returns an array of subclasses directly inheriting from the receiver, not including singleton classes....
12 September 2021
Rails 6 provides a simpler way to query the records which does not have any associated records or orphan records...
04 September 2021
Rails 7 adds method in_order_of in QueryMethods, this allows you to specify an explicit order for the records. Example usage...
30 August 2021
Rails 7 adds method sole and find_sole_by in ActiveRecord::FinderMethods, which enables you to get sole or single record by the...