Tag: computer science
-
Rubocop - Ruby static code analyzer
Setting up RuboCop on a Rails project: which of the three shipped configs to start from, and the rules worth disabling. -
Preview file using send_file
Serving access-controlled uploads in Rails with send_file, what :disposition decides, and where CarrierWave's secure-upload setup fits. -
db/seeds for carrierwave
Writing db/seeds for a CarrierWave attachment, for one file and for several, with the sqlite string-column caveat. -
N+1 issue
Why one query for cars and one per car for wheels becomes N+1, and how eager loading collapses it to two.