19 Matching Annotations
  1. Apr 2020
  2. Jan 2020
    1. I love merge too. Wow, it's been around a while.

      > ? merge
      From: ~/.gem/ruby/2.4.5/gems/activerecord-5.2.2/lib/active_record/relation/spawn_methods.rb @ line 14:
      Owner: ActiveRecord::SpawnMethods
      Visibility: public
      Signature: merge(other)
      Number of lines: 17
      Merges in the conditions from other, if other is an ActiveRecord::Relation.
      Returns an array representing the intersection of the resulting records with other, if other is an array.
    1. table name was not specified in the default scope definition. Since ActiveRecord does not canonically reference fields, after inner joining with another table another_table.term_id column can’t be found.
    1. You might be thinking––"a tool that allows me to write semantic and reusable queries? Sounds like Active Record". It's absolutley true that Active Record already provides a powerful query tool kit. But what happens when even simple queries stretch the bounds of Active Record's capabilities?
    1. before_destroy callbacks should be placed before dependent: :destroy associations (or use the prepend: true option), to ensure they execute before the records are deleted by dependent: :destroy.
  3. Dec 2019
  4. Aug 2019