Articles by Rohit Joshi

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`.

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 [ ]

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.

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.

Rails 7 adds #excluding to ActiveRecord::Relation

Rails 7 adds #excluding to ActiveRecord::Relation to exclude a record or collection of records.