Module: CroppedPaperclip::Schema

Defined in:
lib/cropped_paperclip/schema.rb

Overview

Provides helpers that can be used in migrations. Copied from, and often makes calls on, the equivalent file in Paperclip.

Defined Under Namespace

Modules: TableDefinition

Constant Summary collapse

UPLOAD_COLUMNS =
{
  :file_name    => :string,
  :content_type => :string,
  :file_size    => :integer,
  :updated_at   => :datetime,
  :upload_id    => :integer,
  :scale_width  => :integer,
  :scale_height => :integer,
  :offset_left  => :integer,
  :offset_top   => :integer
}

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



18
19
20
21
# File 'lib/cropped_paperclip/schema.rb', line 18

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