7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/paperclip/glue.rb', line 7
def self.included(base)
base.extend ClassMethods
base.send :include, Callbacks
base.send :include, Validators
base.send :include, Schema
base.class_attribute :attachment_definitions
if defined?(ActiveRecord)
ActiveRecord::ConnectionAdapters::AbstractAdapter.send(:include, Paperclip::Schema)
ActiveRecord::ConnectionAdapters::Table.send(:include, Paperclip::Schema)
ActiveRecord::ConnectionAdapters::TableDefinition.send(:include, Paperclip::Schema)
end
locale_path = Dir.glob(File.dirname(__FILE__) + "/locales/*.{rb,yml}")
I18n.load_path += locale_path unless I18n.load_path.include?(locale_path)
end
|