Sha256: 744f06be994744cd3edd5dba1ac3525e9967cd5f869a65dfa005df1a28b9533a

Contents?: true

Size: 571 Bytes

Versions: 16

Compression:

Stored size: 571 Bytes

Contents

class MoveQbrickAssets < ActiveRecord::Migration
  def old_qbrick_assets_dir
    File.join(Rails.root,'public/uploads/qbrick')
  end

  def new_qbrick_assets_dir
    File.join(Rails.root,'public/uploads/cms')
  end

  def up
    if File.exists? old_qbrick_assets_dir
      puts "Moving Qbrick Assets from #{old_qbrick_assets_dir} to #{new_qbrick_assets_dir}"
      File.rename old_qbrick_assets_dir, new_qbrick_assets_dir
    end
  end

  def down
    if File.exists? new_qbrick_assets_dir
      File.rename new_qbrick_assets_dir, old_qbrick_assets_dir
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
qbrick-2.7.1 db/migrate/14_move_qbrick_assets.rb
qbrick-2.7 db/migrate/14_move_qbrick_assets.rb
qbrick-2.6.10 db/migrate/14_move_qbrick_assets.rb
qbrick-2.6.9 db/migrate/14_move_qbrick_assets.rb
qbrick-2.6.8 db/migrate/14_move_qbrick_assets.rb
qbrick-2.6.7 db/migrate/14_move_qbrick_assets.rb
qbrick-2.6.6 db/migrate/14_move_qbrick_assets.rb
qbrick-2.6.5 db/migrate/14_move_qbrick_assets.rb
qbrick-2.6.4 db/migrate/14_move_qbrick_assets.rb
qbrick-2.6.3 db/migrate/14_move_qbrick_assets.rb
qbrick-2.6.2 db/migrate/14_move_qbrick_assets.rb
qbrick-2.6.1 db/migrate/14_move_qbrick_assets.rb
qbrick-2.6.0 db/migrate/14_move_qbrick_assets.rb
qbrick-2.5.2 db/migrate/14_move_qbrick_assets.rb
qbrick-2.5.1 db/migrate/14_move_qbrick_assets.rb
qbrick-2.5.0 db/migrate/14_move_qbrick_assets.rb