Remove danging :photos table and other photo cruft
This commit is contained in:
parent
1ce834391a
commit
ae55c2772f
7 changed files with 15 additions and 37 deletions
|
|
@ -30,7 +30,6 @@ class Conference < ActiveRecord::Base
|
|||
has_many :vpositions, dependent: :destroy
|
||||
has_many :sponsorship_levels, -> { order('position ASC') }, dependent: :destroy
|
||||
has_many :sponsors, dependent: :destroy
|
||||
has_many :photos, dependent: :destroy
|
||||
has_many :targets, dependent: :destroy
|
||||
has_many :campaigns, dependent: :destroy
|
||||
has_many :commercials, as: :commercialable, dependent: :destroy
|
||||
|
|
@ -44,7 +43,6 @@ class Conference < ActiveRecord::Base
|
|||
accepts_nested_attributes_for :questions, allow_destroy: true
|
||||
accepts_nested_attributes_for :vdays, allow_destroy: true
|
||||
accepts_nested_attributes_for :vpositions, allow_destroy: true
|
||||
accepts_nested_attributes_for :photos, allow_destroy: true
|
||||
accepts_nested_attributes_for :targets, allow_destroy: true
|
||||
accepts_nested_attributes_for :campaigns, allow_destroy: true
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
class Photo < ActiveRecord::Base
|
||||
belongs_to :conference
|
||||
validates_presence_of :picture
|
||||
has_attached_file :picture,
|
||||
styles: { thumb: '100x100>', large: '300x300>', banner: '600x300>' }
|
||||
|
||||
validates_attachment_content_type :picture,
|
||||
content_type: [/jpg/, /jpeg/, /png/, /gif/],
|
||||
size: { in: 0..500.kilobytes }
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue