I'm new on both this site and ruby on rails! I have a common installation of authlogic and want password to be generated automaticly for user registration if user did not set the password. What is the best way to do it?
The solution is:
#app/models/User.rb
class User < ActiveRecord::Base
#...
before_validation_on_create { |record| record.randomize_password unless record.password }
#...
end