Skip to content

Instantly share code, notes, and snippets.

@aldesantis
Created November 15, 2016 21:24
Show Gist options
  • Save aldesantis/6e561d6d10d56b4dd18c7683e70af5aa to your computer and use it in GitHub Desktop.
Save aldesantis/6e561d6d10d56b4dd18c7683e70af5aa to your computer and use it in GitHub Desktop.
class AddTagsToPosts < ActiveRecord::Migration
def migrate
add_column :posts, :tags, :text
end
end
class Post < ActiveRecord::Base
serialize :tags, Array
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment