annotate db/migrate/062_insert_builtin_roles.rb @ 1458:b1f4c9a2af24 bug_794

Makes the default radio button checked by default -- this should fix bug #794.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Mon, 11 Nov 2013 18:25:22 +0000
parents 433d4f72a19b
children
rev   line source
Chris@0 1 class InsertBuiltinRoles < ActiveRecord::Migration
Chris@0 2 def self.up
Chris@1115 3 Role.reset_column_information
Chris@0 4 nonmember = Role.new(:name => 'Non member', :position => 0)
Chris@0 5 nonmember.builtin = Role::BUILTIN_NON_MEMBER
Chris@0 6 nonmember.save
Chris@909 7
Chris@0 8 anonymous = Role.new(:name => 'Anonymous', :position => 0)
Chris@0 9 anonymous.builtin = Role::BUILTIN_ANONYMOUS
Chris@909 10 anonymous.save
Chris@0 11 end
Chris@0 12
Chris@0 13 def self.down
Chris@0 14 Role.destroy_all 'builtin <> 0'
Chris@0 15 end
Chris@0 16 end