Today I Learned

TIL, 2017-07-17

  • config.middleware.delete 'ActiveRecord::QueryCache'
  • Saving phone numbers: Split across country code and phone number. Country code no plus. (According to Twilio convention.)
  • Array.uniq includes a block that determines the uniqueness of elements.
  • Returning boolean from the JOIN statement: 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: :y to 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 --debugger was used before, now it’s not.

This project is maintained by daryllxd