new user create : active_scaffold
the basic create user : authlogic
class Admin::UsersController < ApplicationController
active_scaffold :user do |config|
config.columns = [:username,:email,:role]
config.list.columns =
[:username, :email, :created_at, :updated_at]
config.create.columns =
[:username,:email,:crypted_password, :password_salt,:role]
config.update.columns.exclude :crypted_password,:password_salt,
:persistence_token
#config.actions.swap :search, :live_search
config.search.live = true
config.list.per_page = 12
end
under admin create new user just have 2 errors
* Password is too short (minimum is 4 characters)
* Password confirmation is too short (minimum is 4 characters)
but the password is not short ,I use "123123" is also the 2 errors,
the create form just have a "creat" button
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Processing Admin::UsersController#create (for 127.0.0.1 at 2010-11-15
16:20:19) [POST]
Parameters: {"commit"=>"Create",
"authenticity_token"=>"AOJXPA5tBU09zkyScIVfinOAnvYQCelOKWW5Fx4HeO0=",
"record"=>{"crypted_password"=>"123123", "role"=>"user",
"username"=>"diff", "password_salt"=>"123123",
"email"=>"[email protected]"}}
SQL (0.1ms) BEGIN
User Load (0.3ms) SELECT `users`.id FROM `users` WHERE
(LOWER(`users`.`email`) = BINARY '[email protected]') LIMIT 1
User Load (0.2ms) SELECT `users`.id FROM `users` WHERE
(LOWER(`users`.`username`) = BINARY 'diff') LIMIT 1
User Load (0.1ms) SELECT `users`.id FROM `users` WHERE
(`users`.`persistence_token` = BINARY
'684d82118da9cf81c63d55fce0e3ce8fa9295d9688a899ac5a7ebcf4cae254d4a139464a75527c9f839e28d695b69a3041f536e2f926a0fd7a7bf13d28093320')
LIMIT 1
SQL (0.1ms) COMMIT
--
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en.