You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

062_insert_builtin_roles.rb 403B

123456789101112131415
  1. class InsertBuiltinRoles < ActiveRecord::Migration
  2. def self.up
  3. nonmember = Role.new(:name => 'Non member', :position => 0)
  4. nonmember.builtin = Role::BUILTIN_NON_MEMBER
  5. nonmember.save
  6. anonymous = Role.new(:name => 'Anonymous', :position => 0)
  7. anonymous.builtin = Role::BUILTIN_ANONYMOUS
  8. anonymous.save
  9. end
  10. def self.down
  11. Role.destroy_all 'builtin <> 0'
  12. end
  13. end