These are all minor but have caught me head scratching.
- Action Cable Documentation (I haven’t been able to get my head around it. Nothing specific but its a nice extension I want to use but I don’t understand how it works and none of the tutorials I’ve tried have worked for me either.) Maybe revamp the documentation?
Model.column_namesreturns a reference not a copy. I created an issue by pushing or deleting items from this without realizing it was not a clone or a dup. This is super minor except for one key thing. Error caused by this appear very far away from the code where this happens, usually when creating records while importing (as is my case). Consider adding a
!bang to the end? Or at least improving the present documentation to make it clear it returns the actual property and not a copy of it.
**column_names** () Returns an array of column names as strings.
- The many-to-many relationship (
has_and_belongs_to_manyw/ join table) expects a very specific name of the join table. I created the join table but set the name of the table on the migration, and then couldn’t understand why this relationship didn’t work. Took me a while to realize that I’d named it in singular and Rails was expecting it in plural. So even though the tables were tied in the db, Rails just was confused by not finding a very specifically named table. This specificity is not mentioned in the documentation.