Code & Clay – Notes to self. Mainly Ruby/Rails.
02 Mar 2019
Audiobook streaming platform on AWS stack and Ruby on Rails
How to rename database columns in Rails
Use inverse_of when creating associations with non-standard naming
Use is_a? when checking class
Enhanced shell scripting with Ruby
Understanding how to implement a feature that enables users to follow each other
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: How can I create multiple rows at once?