Skip to content

Instantly share code, notes, and snippets.

@krtschmr
Created August 9, 2015 18:33
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
before_validation do
self.site_id = 1
self.username=Devise.friendly_token.first(4)
self.slug = Devise.friendly_token.first(4)
self.email = "#{Devise.friendly_token.first(4)}@ficken.de"
generated_password = Devise.friendly_token.first(8)
self.password = generated_password
self.password_confirmation = generated_password
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment