For dev bloggers
Start publishing articles on your own domain with Hashnode and tag them with #rubyonrails. Learn more
📢 Hashnode + Vercel
15 Jan - Feb 7 (3 Weeks)
What are they?
ActiveRecord callback is a tricky Rails-way method to trigger some code in different phases of persisting model object.
The first script ensures your Sidekiq instances would act properly on each application deployment:
command: "mkdir -p…
Imagine that you develop an e-commerce platform. Your basic model is Order.
You would have some constraints which don't have to be valid before order …
&., called “safe navigation operator”, allows to skip method call when receiver is nil. It returns nil and doesn't evaluate method's arguments if the …
I use code snippets rather than long English paragraphs to explicate the working.
Let's take a look at Ruby's try method: