Description:
merge with syntax highlighter
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r421:c902a510d4ef - - 1 file changed: 11 inserted, 0 deleted
@@ -173,26 +173,37 | |||||
|
173 | :full_name => 'Administrator', |
|
173 | :full_name => 'Administrator', |
|
174 | :alias => 'root') |
|
174 | :alias => 'root') |
|
175 | root.password = 'ioionrails'; |
|
175 | root.password = 'ioionrails'; |
|
176 |
|
176 | ||
|
177 | class << root |
|
177 | class << root |
|
178 | public :encrypt_new_password |
|
178 | public :encrypt_new_password |
|
179 | def valid?(context=nil) |
|
179 | def valid?(context=nil) |
|
180 | true |
|
180 | true |
|
181 | end |
|
181 | end |
|
182 | end |
|
182 | end |
|
183 |
|
183 | ||
|
184 | root.encrypt_new_password |
|
184 | root.encrypt_new_password |
|
185 |
|
185 | ||
|
186 | root.roles << Role.find_by_name('admin') |
|
186 | root.roles << Role.find_by_name('admin') |
|
187 |
|
187 | ||
|
188 | root.activated = true |
|
188 | root.activated = true |
|
189 | root.save |
|
189 | root.save |
|
190 | end |
|
190 | end |
|
191 |
|
191 | ||
|
192 | def seed_users_and_roles |
|
192 | def seed_users_and_roles |
|
193 | seed_roles |
|
193 | seed_roles |
|
194 | seed_root |
|
194 | seed_root |
|
195 | end |
|
195 | end |
|
196 |
|
196 | ||
|
|
197 | + def seed_more_languages | ||
|
|
198 | + Language.delete_all | ||
|
|
199 | + Language.create( name: 'c', pretty_name: 'C', ext: 'c', common_ext: 'c' ) | ||
|
|
200 | + Language.create( name: 'cpp', pretty_name: 'C++', ext: 'cpp', common_ext: 'cpp,cc' ) | ||
|
|
201 | + Language.create( name: 'pas', pretty_name: 'Pascal', ext: 'pas', common_ext: 'pas' ) | ||
|
|
202 | + Language.create( name: 'ruby', pretty_name: 'Ruby', ext: 'rb', common_ext: 'rb' ) | ||
|
|
203 | + Language.create( name: 'python', pretty_name: 'Python', ext: 'py', common_ext: 'py' ) | ||
|
|
204 | + Language.create( name: 'java', pretty_name: 'Java', ext: 'java', common_ext: 'java' ) | ||
|
|
205 | + end | ||
|
|
206 | + | ||
|
197 | seed_config |
|
207 | seed_config |
|
198 | seed_users_and_roles |
|
208 | seed_users_and_roles |
|
|
209 | + seed_more_languages |
You need to be logged in to leave comments.
Login now