Description:
fix migration & model link bug in migration version 10 git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@91 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r42:0dae6922a01b - - 1 file changed: 7 inserted, 0 deleted

@@ -1,12 +1,19
1 1 class AddAdminAndRoles < ActiveRecord::Migration
2 +
3 +
2 4 def self.up
3 5 root = User.new(:login => 'root',
4 6 :full_name => 'Administrator',
5 7 :alias => 'root')
6 8 root.password = 'ioionrails';
9 +
10 + class << root
11 + public :encrypt_new_password
12 + end
13 +
7 14 root.encrypt_new_password
8 15
9 16 role = Role.create(:name => 'admin')
10 17 root.roles << role;
11 18 root.save
12 19
You need to be logged in to leave comments. Login now