class CreateAvatars
Public Instance Methods
change()
click to toggle source
# File lib/generators/project/db/migrate/21_create_avatars.rb, line 2 def change create_table :avatars do |t| t.references :imageable, polymorphic: true, index: true t.attachment :uploaded_file t.integer :imageable_id, unsigned: true, index: true, limit: 3 t.string :imageable_type, index: true t.timestamps null: false end end