def attachable(options = {})
      # Store the default prefix for file data
      # Defaults to "file"
      cattr_accessor :attachment_file_prefix
      self.attachment_file_prefix = (options[:file_prefix] || :file).to_s
      
      # Setup the default scope so the file data isn't included by default.
      # Generate the default scope, which includes every column except for the data column.
      # We use this so queries, by default, don't include the file data which could be quite large.
      default_scope { select(column_names.reject { |n| n == "#{attachment_file_prefix}_data" }.collect {|n| "#{table_name}.#{n}" }.join(',')) }
      
      # Include all the important stuff
      include InstanceMethods
    end
def attachable(options = {})
      # Store the default prefix for file data
      # Defaults to "file"
      cattr_accessor :attachment_file_prefix
      self.attachment_file_prefix = (options[:file_prefix] || :file).to_s
      
      # Setup the default scope so the file data isn't included by default.
      # Generate the default scope, which includes every column except for the data column.
      # We use this so queries, by default, don't include the file data which could be quite large.
      default_scope { select(column_names.reject { |n| n == "#{attachment_file_prefix}_data" }.collect {|n| "#{table_name}.#{n}" }.join(',')) }
      
      # Include all the important stuff
      include InstanceMethods
    end
Loads the attachable methods, scope, and config into the model.