def initialize(*args)
if !self.class.configured_password_methods
if login_field
self.class.send(:attr_writer, login_field) if !respond_to?("#{login_field}=")
self.class.send(:attr_reader, login_field) if !respond_to?(login_field)
end
if password_field
self.class.send(:attr_writer, password_field) if !respond_to?("#{password_field}=")
self.class.send(:define_method, password_field) {} if !respond_to?(password_field)
self.class.class_eval "private\n# The password should not be accessible publicly. This way forms using form_for don't fill the password with the\n# attempted password. To prevent this we just create this method that is private.\ndef protected_\#{password_field}\n@\#{password_field}\nend\n", __FILE__, __LINE__
end
self.class.configured_password_methods = true
end
super
end