mirror of
https://github.com/kemko/paperclip.git
synced 2026-01-01 16:05:40 +03:00
Rubocop
This commit is contained in:
@@ -344,6 +344,6 @@ end
|
||||
|
||||
# Set it all up.
|
||||
if Object.const_defined?("ActiveRecord")
|
||||
ActiveRecord::Base.include(Paperclip)
|
||||
ActiveSupport.on_load(:active_record) { include Paperclip }
|
||||
File.include(Paperclip::Upfile)
|
||||
end
|
||||
|
||||
@@ -15,11 +15,11 @@ module Paperclip
|
||||
def define_paperclip_callbacks(*callbacks)
|
||||
define_callbacks(*callbacks.flatten, {})
|
||||
callbacks.map(&:to_sym).each do |callback|
|
||||
define_singleton_method "before_#{callback}" do |*args, &blk|
|
||||
define_singleton_method :"before_#{callback}" do |*args, &blk|
|
||||
set_callback(callback, :before, *args, &blk)
|
||||
end
|
||||
|
||||
define_singleton_method "after_#{callback}" do |*args, &blk|
|
||||
define_singleton_method :"after_#{callback}" do |*args, &blk|
|
||||
set_callback(callback, :after, *args, &blk)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user