shivabhusal/storify

View on GitHub
app/models/picture.rb

Summary

Maintainability
A
0 mins
Test Coverage
# == Schema Information
#
# Table name: pictures
#
#  id             :integer          not null, primary key
#  name           :string
#  payload        :string
#  imageable_type :string
#  imageable_id   :integer
#  created_at     :datetime         not null
#  updated_at     :datetime         not null
#

class Picture < ApplicationRecord
  belongs_to :imageable, polymorphic: true
  mount_uploader :payload, ImagesUploader
end