Code Monkey home page Code Monkey logo

Comments (4)

ippa avatar ippa commented on July 20, 2024

Scrap the above, was due to a brainmeltdown. Now I seem to have run into something real though:

NoMethodError (undefined method `callback' for #Image:0x7fb12eef2f40):

This error seems to trigger right after the whole image has been uploaded.
Smells active record 3.0 ...

from attachment_fu.

dmann avatar dmann commented on July 20, 2024

It looks like ActiveRecord::Callbacks has changed a bunch in Rails 3. The callback method that attachment_fu is trying to call was a private method and looks like it was removed with the following commit:

http://github.com/rails/rails/commit/4f37b97033f596ec2c95eb53e9964e051c224981#L10L360

I don't actually use the after_attachment_saved callback in my app, so I just commented out the following line in vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu.rb:

callback :after_attachment_saved

from attachment_fu.

tfl avatar tfl commented on July 20, 2024

you are right, dmann. Commenting this out "solves" the problem but raises a bigger one: an uploaded image will stay as it is - no further processing will happen. So... no thumbnail generation will take place. Disable callbacks makes attachment_fu almost useless.

It's a great pity because AF seems not be actively maintained anymore.

from attachment_fu.

jagthedrummer avatar jagthedrummer commented on July 20, 2024

Take a look at :
http://github.com/woahdae/attachment_fu - rails3 branch

I installed it with :
./script/rails plugin install http://github.com/woahdae/attachment_fu.git -r rails3

So far (less than an hour in) it's working as I expect. I've even pulled in a few extensions that I've used for other projects and they're working too.

from attachment_fu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.