Permalink
Browse files

Refactor code just a little bit

  • Loading branch information...
1 parent 593acb1 commit e0b139d0b19f31c4ed0977f277bc07e847b02ec3 @sikachu sikachu committed Jul 29, 2011
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/paperclip.rb
View
6 lib/paperclip.rb
@@ -179,10 +179,8 @@ class InfiniteInterpolationError < PaperclipError #:nodoc:
module Glue
def self.included base #:nodoc:
base.extend ClassMethods
- if base.respond_to?("class_attribute")
- base.class_attribute :attachment_definitions
- end
- if base.respond_to?("set_callback")
+ base.class_attribute :attachment_definitions if base.respond_to?(:class_attribute)
+ if base.respond_to?(:set_callback)
base.send :include, Paperclip::CallbackCompatability::Rails3
else
base.send :include, Paperclip::CallbackCompatability::Rails21

0 comments on commit e0b139d

Please sign in to comment.