
Conflicts with schema_validations plugin
Reported by Ryan McGeary | January 15th, 2008 @ 04:56 PM
I ran into issues using attachment_fu while also using the schema_validation plugin. Our model looks like this (no need for thumbnails):
class Document < ActiveRecord::Base
has_attachment :content_type => 'application/pdf', :storage => :s3
end
Afterwards, schema_validations blows up after it cannot find a parent_id column. Rightfully so, since we don't have one, but it was triggered by attachment_fu declaring a belongs_to :parent relationship.
Attached is the diff to workaround this problem.
Comments and changes to this ticket
-
Ryan McGeary January 15th, 2008 @ 10:25 PM
- Assigned user set to Rick
-
-
-
Ryan McGeary March 15th, 2008 @ 12:22 PM
Rob, good call. I'd argue that most of the tests are invalid as an attachment without thumbnails should not have a parent nor should it have a thumbnails association, but let me see if I can find some easy workaround to make everything happy.
Unfortunately, when I originally ran the attachment_fu tests, I was running it within a full-fledged rails project with other plugins that were causing conflicts with the tests, and I ignored a bunch of errors. That was dumb on my part. Running the tests against a vanilla rails app now.
-
-
-
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป