Table for links added (links to add images/documents).

Custom partial for admins upload image created, so that it can be reused in upload images and documents.
This commit is contained in:
iagirre
2017-09-29 14:51:49 +02:00
parent 77d0a551cf
commit c67620fdef
8 changed files with 96 additions and 24 deletions

View File

@@ -5,6 +5,7 @@ module Imageable
included do
has_one :image, as: :imageable, dependent: :destroy
has_many :images, as: :imageable, dependent: :destroy
accepts_nested_attributes_for :image, allow_destroy: true, update_only: true
def image_url(style)

View File

@@ -1,5 +1,6 @@
class Poll < ActiveRecord::Base
include Imageable
include Imageable
include Documentable
has_many :booth_assignments, class_name: "Poll::BoothAssignment"
has_many :booths, through: :booth_assignments