Code & Clay
Notes to self. Mainly Ruby/Rails.
02 Mar 2019
Giving an association a custom name
Converting a pgsql file to CSV
Polly want a message
Be careful when memoizing booleans!
Value Objects In Ruby
Override `#hash` when overriding `#eql?`
The naked asterisk
Write software well
Dependency injection is not a virtue
Primay keys: UUID vs bigint – or both?
Polymorphic many to many
Running the console in the test environment helped me debug a test
UUID as column type in create_join_table
Dependent destroy when another table uses a different foreign_id
Avoid the three-state boolean problem
Be Careful Assigning to has_one Relations
RESTful user intentions
An improved query
Updating an element with AJAX and UJS
Prevent controllers from loading all helper modules
Finding rows in a table that point to rows in another that match all the specified column values…
Rails SQL Injection
Counting rows with the most many to many associations
Joins, Includes, Preload
How to Count With ActiveRecord
Don't forget the database!
Rails: Creating multiple rows at once
Signal V. Noise