public Method

SecretKeyGenerator.generate_secret

Generate a random secret key with the best possible method available on the current platform.

Source Code

# File rails_generator/secret_key_generator.rb, line 18
def generate_secret
  generator = GENERATORS.find do |g|
    self.class.send("supports_#{g}?")
  end
  send("generate_secret_with_#{generator}")
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.