Abhay's July Newsletter
Dev Joke
Q: Why didn't the `<div />` get invited to the dinner party?
A: Because it had no class.
My blogs
- File upload in GraphQL-ruby and React can be bit tricky. You can use Active Storage direct file upload in GraphQL-ruby.
- Tired of using the raw SQL notation for comparison in Rails with where clause. Rails 6.1 adds support for where with a comparison operator.
- Rails 6.1 makes it easier to configure a default value for Active Record enum attributes
- Understand the benefits of the new change where Active Storage variant are tracked in the database.
Reading/watching list.
- A talk by Dan Abramov on The WET Codebase. Have you ever encountered a situation where DRY code is starting look like a mess? If yes, you would be able to resonate with the talk and if you don't I bet it would add a new perspective to the design principle you like to follow and make a proper decision.
- We never give damn about the compiler but we are using tons of them. If you are a React developer, you are already using Babel, Webpacker to compile your code. I came across such Super Tiny Compiler.
- Have you ever wanted a library to build a random GraphQL query for you? Nope. Right. Here is a GraphQL Query Generator by IBM with reasoning where you might need it.
- Web-development is distributed system. The frontend is a distributed system. I didn't know. Watch a talk by Vaidehi Joshi on Setting up to fail
Open-source libraries/contributions.
- Problem statement: How to do soft delete when using Action Text? Let's say, a Product model uses Action Text and soft delete. When a product is soft deleted the Action Text record is hard deleted when using
paranoia
gem. To solve this issue usediscard
gem and understand Why not paranoia or acts_as_paranoid? - Added documentation for _default option added to ActiveRecord::Enum
Rails changelog
- A new Action Mailer bug report template to easily generate reproduction script for Rails team/contributor to resolve the issue. #39367
- Rails conductor Action Mailbox form could be auto-filled by passing params in the URL. #39842
- Rails 6.1 now allows configuring enum defaults. #39820
- Active Storage attachment now touches the parent model on
purge
. #39891
NOTE: This month the development on Rails is slow and not a lot of new feature/fixes/improvement were merged than usual.
Watching/Reading/Reviews
- I am watching: One Piece and I love it :P
- I am reading: How to Win Friends and Influence People by Dale Carnegie. You need to practice these techniques and you would see the changes in your life. I sometimes forget them but you got to practice these things and be a good influence on people.
Happy coding folks. You can reach out to me twitter for anything and I'll be happy to chat. Don't hesitate.
Don't miss what's next. Subscribe to Abhay's Monthly Newsletter: