Today I Learned

TIL, 2017-08-07

  • dependent: :destroy
  • Searching and filtering: construct the where clause in the query builder part of the code.
  • lol_dba: Gem to find which columns should be indexed.
  • is_defined?
  • Rails.application.eager_load! – loads all railties.
  • ObjectSpace.each_object(Module): gets all currently loaded objects.
  • Pomodoro.descends_from_active_record? is a thing.
  • Pomodoro.reflections to see the has_many, etc. relationships.
  • ActiveSupport#each_pair: Calls block once for each key, passing the key-value as parameters.
  • ActiveRecord::Base.indexes('books') to list all the indices.
  • Don’t put things in the app directory that you don’t want to load anyway.
  • FileUtils.rm_rf
  • The where method in AR returns a proxy object.

This project is maintained by daryllxd