Commit e0b139d0 by Prem Sichanugrist

Refactor code just a little bit

parent 593acb1d
...@@ -179,10 +179,8 @@ module Paperclip ...@@ -179,10 +179,8 @@ module Paperclip
module Glue module Glue
def self.included base #:nodoc: def self.included base #:nodoc:
base.extend ClassMethods base.extend ClassMethods
if base.respond_to?("class_attribute") base.class_attribute :attachment_definitions if base.respond_to?(:class_attribute)
base.class_attribute :attachment_definitions if base.respond_to?(:set_callback)
end
if base.respond_to?("set_callback")
base.send :include, Paperclip::CallbackCompatability::Rails3 base.send :include, Paperclip::CallbackCompatability::Rails3
else else
base.send :include, Paperclip::CallbackCompatability::Rails21 base.send :include, Paperclip::CallbackCompatability::Rails21
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment