Skip to content

Instantly share code, notes, and snippets.

@simoleone
Created March 28, 2019 12:48
Show Gist options
  • Save simoleone/308d4fb41e85a460574e1af44f96c02b to your computer and use it in GitHub Desktop.
Save simoleone/308d4fb41e85a460574e1af44f96c02b to your computer and use it in GitHub Desktop.
Adding a Shrine field
class AddShrineImages < ActiveRecord::Migration[5.2]
def change
add_column :my_interesting_thing, :image_data, :text
end
end
class MyInterestingThing < ApplicationRecord
include ThingImageUploader::Attachment.new(:image)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment