Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
class PlacesTsearch < ActiveRecord::Migration def self.up execute("ALTER TABLE places ADD COLUMN tsearchable tsvector; UPDATE places SET tsearchable=to_tsvector('english',coalesce(title_ascii,'')); CREATE INDEX tsearchable_idx ON places USING gin(tsearchable);") execute("VACUUM FULL ANALYZE;") end def self.down remove_column :places, :tsearchable end end
This paste will be private.
From the Design Piracy series on my blog: