Sha256: 78a6e7accc3f10aa0f36a4a7e1b09c83737c9538f0d6570079c0a9fa89389cc9

Contents?: true

Size: 266 Bytes

Versions: 1

Compression:

Stored size: 266 Bytes

Contents

class RenameCollaboratorsToMembers < ActiveRecord::Migration
  def up
    ProjectUser.where(role: "collaborator").each { |c| c.role = "member"; c.save! }
  end

  def down
    ProjectUser.where(role: "member").each { |c| c.role = "collaborator"; c.save! }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
self_systeem-0.1.0 test/dummy_app/db/migrate/20140330222550_rename_collaborators_to_members.rb