Module: Paperclip::Schema

Defined in:
lib/paperclip/schema.rb

Overview

Provides helper methods that can be used in migrations.

Defined Under Namespace

Modules: CommandRecorder, Statements, TableDefinition

Constant Summary

COLUMNS =
{:file_name    => :string,
:content_type => :string,
:file_size    => :integer,
:updated_at   => :datetime}

Class Method Summary (collapse)

Class Method Details

+ (Object) included(base)



11
12
13
14
15
16
17
18
19
# File 'lib/paperclip/schema.rb', line 11

def self.included(base)
  ActiveRecord::ConnectionAdapters::Table.send :include, TableDefinition
  ActiveRecord::ConnectionAdapters::TableDefinition.send :include, TableDefinition
  ActiveRecord::ConnectionAdapters::AbstractAdapter.send :include, Statements

  if defined?(ActiveRecord::Migration::CommandRecorder) # Rails 3.1+
    ActiveRecord::Migration::CommandRecorder.send :include, CommandRecorder
  end
end