Acts_as_attachment failing tests, thumbnailing

Hi all,

I’m having trouble getting acts_as_attachment going. It’s installed
and configured as per the documentation:

http://weblog.techno-weenie.net/articles/acts_as_attachment

However, it’s throwing the error that:

undefined method `find_or_initialize_by_thumbnail_and_parent_id’ for
BranchLogo:Class

when trying to create an object.

It’s also failing a large number of tests when I try and run the unit
tests:

47 tests, 152 assertions, 0 failures, 12 errors

(All to do with thumbnailing)

Have I got something misconfigured? Or have I grabbed a broken
version? Or is this a known problem?

Thanks a lot!

Tom

Tom T. wrote:

Hi all,

I’m having trouble getting acts_as_attachment going. It’s installed
and configured as per the documentation:

With thanks from Rick, I’ve managed to get this going. Turned out the
latest version needs edge rails, and I was running 1.1.6.

This version works correctly:

http://svn.techno-weenie.net/projects/plugins/tags/acts_as_attachment-1.1.6/

Cheers,

Tom

Tom T. wrote:

Tom T. wrote:

Hi all,

I’m having trouble getting acts_as_attachment going. It’s installed
and configured as per the documentation:

With thanks from Rick, I’ve managed to get this going. Turned out the
latest version needs edge rails, and I was running 1.1.6.

This version works correctly:

http://svn.techno-weenie.net/projects/plugins/tags/acts_as_attachment-1.1.6/

Cheers,

Tom

Hi,

Im having the same trouble with thumbnails.

Im running rails 1.1.6 and also installed this acts_as_attachment
version
http://svn.techno-weenie.net/projects/plugins/tags/acts_as_attachment-1.1.6/

nevermind, im working to hard and have gone deaf dumb and blind.

Is it bad if there is a floating grey thing in my vision ?

I have the smae problem. I need to get the following version:

http://svn.techno-weenie.net/projects/plugins/tags/acts_as_attachment-1.1.6/

I havent used svn before, but asume i have to install that to get this
plugin. Well appart from that i can screen scrape the file contents.

Suggestions on easiest way to download would be appreciated.

Yeah yeah nubie question =)

Adam wrote:

nevermind, im working to hard and have gone deaf dumb and blind.

Is it bad if there is a floating grey thing in my vision ?

I know it is very late, but for ppl who still use Rails 1.1.6, here is
the solution for this problem

http://bloggershetty.blogspot.com/2007/08/actsasattachment-error-undefined-method.html

basically replace find_or_initialize_thumbnail in insance_methods.rb
method with this

def find_or_initialize_thumbnail(file_name_suffix)
respond_to?(:parent_id) ?
thumbnail_class.find_by_thumbnail_and_parent_id
(file_name_suffix.to_s, id) ||
thumbnail_class.new(:thumbnail=>file_name_suffix.to_s,
:parent_id=>id) :
thumbnail_class.new(:thumbnail=>file_name_suffix.to_s)
end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs