thoughtbot/paperclip — Issue #763: Improve 'Events' section of readme
Author: paneq
Created: 2012-03-01 13:09:37+00:00
State: open

After reading the section I was sure that the proper way to use these callbacks is by defining methods named as mentioned in the readme. Instead you should call a class method named like that. An example would be useful to clarify:

GOOD:

```ruby
class User
AUDIO_CONTENT_TYPES = %w(audio/ogg application/ogg)
before_post_process :skip_for_audio
def skip_for_audio
return false if AUDIO_CONTENT_TYPES.include?(asset_content_type)
end
end

```

BAD:

```ruby
class User
AUDIO_CONTENT_TYPES = %w(audio/ogg application/ogg)
def before_post_process
return false if AUDIO_CONTENT_TYPES.include?(asset_content_type)
end
end

```