Using array_position to Sort ActiveRecord Records By Array
In Ruby on Rails, you may face the issue when you try to use .where with array but your expected result is sorted by your input array. Because in Rails…
Read More »Using array_position to Sort ActiveRecord Records By Array
In Ruby on Rails, you may face the issue when you try to use .where with array but your expected result is sorted by your input array. Because in Rails…
Read More »Rails quick tips – How to restrict deleting action and showing flash notice in ActiveAdmin if data have child record
In this post, we are going to share a quick tips about how to restrict deleting action and showing customised flash notice in ActiveAdmin. We use this data model to…
Read More »Cautious when convert a BigDecimal value to JSON in Rails
In Ruby on Rails, we can use to_json to convert data or hash to JSON easily, but we need to be cautious when we convert numeric data to JSON in…
Read More »A quick dive into Low-Level Caching in Ruby on Rails
Caching is a vital and yet often forgotten part of our application that can significantly improve our application’s performance. The simple definition of caching is the act of storing data…
Read More »