Description:
fixed seed.db for mock valid?
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r333:6abae4dc17ba - - 1 file changed: 1 inserted, 1 deleted
@@ -167,25 +167,25 | |||
|
167 | 167 | end |
|
168 | 168 | |
|
169 | 169 | def seed_root |
|
170 | 170 | return if User.find_by_login('root') |
|
171 | 171 | |
|
172 | 172 | root = User.new(:login => 'root', |
|
173 | 173 | :full_name => 'Administrator', |
|
174 | 174 | :alias => 'root') |
|
175 | 175 | root.password = 'ioionrails'; |
|
176 | 176 | |
|
177 | 177 | class << root |
|
178 | 178 | public :encrypt_new_password |
|
179 | - def valid? | |
|
179 | + def valid?(context=nil) | |
|
180 | 180 | true |
|
181 | 181 | end |
|
182 | 182 | end |
|
183 | 183 | |
|
184 | 184 | root.encrypt_new_password |
|
185 | 185 | |
|
186 | 186 | root.roles << Role.find_by_name('admin') |
|
187 | 187 | |
|
188 | 188 | root.activated = true |
|
189 | 189 | root.save |
|
190 | 190 | end |
|
191 | 191 |
You need to be logged in to leave comments.
Login now