Module: Paperclip::Glue

Defined in:
lib/paperclip/glue.rb

Constant Summary collapse

LOCALE_PATHS =
Dir.glob("#{File.dirname(__FILE__)}/locales/*.{rb,yml}")

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/paperclip/glue.rb', line 9

def self.included(base)
  base.extend ClassMethods
  base.send :include, Callbacks
  base.send :include, Validators
  base.send :include, Schema if defined? ActiveRecord::Base

  I18n.load_path += LOCALE_PATHS unless (LOCALE_PATHS - I18n.load_path).empty?
end