Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If before_post_process filter returns false the resource_processing field is not updated #55

Open
bastien opened this issue Jan 10, 2012 · 0 comments

Comments

@bastien
Copy link

bastien commented Jan 10, 2012

I'm not sure wether this is a bug or by design, when the before_post_process filter returns false, the processing is halted but the resource_processing field is not updated.

I used to have this code

before_post_process :image?
process_in_background :resource

def image?
  resource_content_type =~ /image/ ? true : false
end

And after switching to delayed_paperclip 2.4.5.1 (and paperclip 2.4.5) I had to adapt my code to :

before_post_process :image?
process_in_background :resource

def image?
  return true if resource_content_type =~ /image/
  self.update_attribute(:resource_processing, false) # Had to add this line 
  false
end

Or is there a different way to come around this problem?

malandrina pushed a commit to hoteltonight/delayed_paperclip that referenced this issue Feb 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant