- Saving phone numbers: Split across country code and phone number. Country code no plus. (According to Twilio convention.)
Array.uniqincludes a block that determines the uniqueness of elements.
- Returning boolean from the
JOINstatement: You have to create a
FUNCTION, or do a subquery. Well, Postgres needs the one to have that capability since you are in the SQL part already.
- Query counters: This is probably just needed in controller or big interactor tests.
- Link and link tables across to each other: Use the
has_many :x, source: :yto jump through the associations. You can use another AR model’s association to jump, as opposed to using an SQL join (well it would actually be the same thing anyway).
rails server --debuggerwas used before, now it’s not.