Sha256: 52404f9d4a0a1f0e930e5906ed4c661d5dd48e8f6160984b76d9858881ca555f

Contents?: true

Size: 266 Bytes

Versions: 1

Compression:

Stored size: 266 Bytes

Contents

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

  def down
    ProjectUser.where(role: "collaborator").each { |c| c.role = "member"; 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/20140411193503_rename_members_to_collaborators.rb