Puneet Sutar

Puneet is a React and Ruby on Rails Developer.
Puneet Sutar

Eager loading Active Storage models to avoid N+1 issues

Removing N+1 queries when we access the Active Storage attachments associated with an ActiveRecord model.
Puneet Sutar

Ruby 2.7 allows calling a private method with self.

Ruby 2.7 allows calling a private method with a literal self as the receiver.
Puneet Sutar

Handling attachments in Action Text in Rails 6

This is part two of our multipart series exploring Action Text, In part 1, we looked at basic of how we can get started with providing WYSIWYG support in our Apps using ActionText.

Puneet Sutar

Rails 6 introduces Action Text to provide WYSIWYG support in Rails

Rails 6 introduces Action Text, a framework to provide support for creating, storing, displaying and editing of rich text content in your application.
Puneet Sutar

Rails 6 adds db:seed:replant task

Rails 6 adds db:seed:replant task that truncates tables of each database for the current environment and then loads the seed data.
Puneet Sutar

Rails 6 sms link helper

Rails 6.1.0 adds support for sms_to helper, which renders SMS anchor link tag, which when clicked pops open user's SMS client targetting the specified phone number.
Puneet Sutar

Rails 6 delegate to, with private: true option

Rails 6 adds support to pass an additional option private: true in order to delegate methods as private methods