My favorites
▼
|
Sign in
substruct
Open-source Ruby on Rails E-Commerce
Project Home
Downloads
Wiki
Issues
Source
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
75
attachment: delete_product_images_association.patch
(1.2 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Index: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/models/image.rb
===================================================================
--- /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/models/image.rb (revision 78)
+++ /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/models/image.rb (working copy)
@@ -2,7 +2,7 @@
#
class Image < UserUpload
- has_many :product_images
+ has_many :product_images, :dependent => :destroy
has_many :products, :through => :product_images
MAX_SIZE = 10.megabyte
Index: /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/models/product.rb
===================================================================
--- /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/models/product.rb (revision 78)
+++ /home/edmundo/workspace_aptana/substruct_trunk/vendor/plugins/substruct/app/models/product.rb (working copy)
@@ -8,7 +8,7 @@
/
- has_many :product_images
+ has_many :product_images, :dependent => :destroy
has_many :variations,
:dependent => :destroy, :order => 'name ASC'
has_many :images,
Powered by
Google Project Hosting