Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

New rake task for changing attachment options #1119

Closed
wants to merge 4 commits into from

Commits on Dec 29, 2012

  1. Create new rake task for changing file options.

    Create the rake task paperclip:change_options. This task is invoked the same way
    as the refresh tasks (rake CLASS=... paperclip:change_options). It reads a file
    config/new_paperclip_options.yml as an ERB YAML file and saves new attachments
    for CLASS, including all styles, using the merge of the new options onto the
    original options. Existing attachments and models are unaffected.
    
    The purpose of this task is to move existing files to the location/format/styles
    needed for a planned change to attachments. You can copy existing files to a new
    location using this rake task, then deploy a release which sets the new options
    in the model's has_attached_file, and the copied files will be found by
    paperclip.
    
    Using the task also simplifies changing hash_secrets.
    cjc25 committed Dec 29, 2012
    Copy the full SHA
    3af737b View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    9e7b44d View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    3ed1efc View commit details
    Browse the repository at this point in the history
  4. Do not affect :hash paths when changing options.

    :updated_at was changed when saving the files to a new location, so by default
    paths including :hash would be changed.
    cjc25 committed Dec 29, 2012
    Copy the full SHA
    1db703e View commit details
    Browse the repository at this point in the history