Any model save involving a paperclip field in rails master results in the following exception:
wrong number of arguments (2 for 1)
From those two files, it's pretty obvious what happened: the run_callbacks method used to take two arguments and now it only takes one. I did some grepping and it doesn't look like paperclip was using the second argument, so I removed it, and now my models work.
I don't know a whole lot about the internals of paperclip, so feel free to reject this if I horribly broke everything.
fix call to run_callbacks to match rails 4 api
This actually passes current tests, but it would be awesome if you could add a test (or appraisal) showing that it passes in rails master.
Turns out, there are other issues with the tests in rails 4. I'm working on the appraisal and I'll push more code once I get that sorted out.
Shoulda doesn't work in Rails 4 either:
/Users/adam/code/paperclip/test/generator_test.rb:10:in <class:GeneratorTest>': undefined methodcontext' for GeneratorTest:Class (NoMethodError)
from /Users/adam/code/paperclip/test/generator_test.rb:5:in `<top (required)>'
<class:GeneratorTest>': undefined method
I'll take a look at this when I have more time.
Merge remote-tracking branch 'thoughtbot/master'
This pull request passes (merged 176bc59 into cb7ad7b).
Ok, since there are other issues that need to be addressed and you're still working on it, I'm going to close this request so it doesn't get huge and ungainly. When you're done, please create a new one and we'll work on getting it merged. Thanks very much for your work here.
Also, if you haven't already, please make an issue and/or PR for shoulda so we can track that for Rails 4 as well. Thanks!