To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / a7 / a7cc7a3537df3ded519cd03f022f755c7e4d5803.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (431 Bytes)
| 1 | 1296:038ba2d95de8 | Chris | class InsertBuiltinRoles < ActiveRecord::Migration |
|---|---|---|---|
| 2 | def self.up |
||
| 3 | Role.reset_column_information |
||
| 4 | nonmember = Role.new(:name => 'Non member', :position => 0) |
||
| 5 | nonmember.builtin = Role::BUILTIN_NON_MEMBER |
||
| 6 | nonmember.save |
||
| 7 | |||
| 8 | anonymous = Role.new(:name => 'Anonymous', :position => 0) |
||
| 9 | anonymous.builtin = Role::BUILTIN_ANONYMOUS |
||
| 10 | anonymous.save |
||
| 11 | end |
||
| 12 | |||
| 13 | def self.down |
||
| 14 | Role.destroy_all 'builtin <> 0' |
||
| 15 | end |
||
| 16 | end |