Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.31 KB | None | 0 0
  1. class CreateEvents < ActiveRecord::Migration
  2.   def self.up
  3.     create_table :events do |t|
  4.       t.string :title
  5.       t.string :tags
  6.       t.timestamps
  7.     end
  8.   end
  9.  
  10.   def self.down
  11.     drop_table :events
  12.   end
  13. end
  14.  
  15.  
  16. class Event < ActiveRecord::Base
  17.   acts_as_taggable
  18.   acts_as_taggable_on :tags
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement