Articles by Rohit Joshi
Aug 31, 2021
Rails 7 allows anything that responds to `#to_str` into redirect_to
Rails 7 adds support for redirecting using any arguments that respond_to `#to_str`.
Jun 2, 2021
Rails 7 allows access to nested encrypted secrets by method calls
We can now access nested secrets stored in credentials.yml.enc using the dot (.) syntax instead of using [ ]
May 19, 2021
Ruby 3.1 Enumerable#tally now accepts an optional hash to count occurrences
Ruby 3.1 extends the functionality of the Enumerable#tally method introduced in Ruby 2.7. We can now pass another hash whose counts would be added to the resulting tally hash.
May 5, 2021
Rails 7 transforms a Ruby hash into HTML attributes for ERB interpolation
Rails 7 adds `tag.attributes`, which transforms a Hash into HTML Attributes, ready to be interpolated into ERB.
Mar 8, 2021
Rails 7 adds #excluding to ActiveRecord::Relation
Rails 7 adds #excluding to ActiveRecord::Relation to exclude a record or collection of records.