Joined July 2012
·
Posted to
Rails 4 & the PostgreSQL Array data type
over 1 year
ago
default: []
(or '{}') will also result in the whole table been traversed to insert '{}' value for each row. This locks the table on a large production table during the migration. Got bitten so just a friendly note =)
Posted to
Remove Empty Helpers
over 1 year
ago
Tests and fixtures might have been generated along with the empty helpers.
This will be a real handy if you can modify it to remove such common files( e.g. productshelper.rb, spec/helpers/productshelper_spec.rb) too.
Achievements
280 Karma
17,102 Total ProTip Views
Raven
Have at least one original repo where some form of shell script is the dominant language
Mongoose 3
Have at least three original repos where Ruby is the dominant language
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Bear
Have at least one original repo where Objective-C is the dominant language
Forked
Have a project valued enough to be forked by someone else
Charity
Fork and commit to someone's open source project in need
Mongoose
Have at least one original repo where Ruby is the dominant language
In trying to use array fields, it seems that GIN indices are not used when we query the array field with
ANY
. We have to use@>
to use the index as we typically think it should.I wrote a short one about it. https://coderwall.com/p/ey7mbq.