TIL, 2017-07-10
ActiveRecord::EachValidator
, how to write it.- Apparently there is an
options
field there? - Confirming: Rails
find
method: find, if many, return all, if unable to find all, raiseActiveRecord::RecordNotFound
. Select. From
in Rails.- Namespacing: If the namespace verb already exists in the current namespace, that’s when you do the
::
before. paranoia
oracts_as_paranoid
for soft delete: this would work only if you need the parent when calling from the orphan.Rails.root
.- Twilio has a lookup API.
- AR is peppered with
RangeError
–raised when a numerical value is out of range. - Daemonize
Redis
:redis-server &
. - Redis sentinel: High availability for Redis. Using Sentinel, you can create a Redis deployment that resists without human intervention to certain kinds of failures.
- Distributed system: Acts as authority for clients service: clients connect to Sentinels in order to ask for the current Redis master responsible for a given service.