Created
January 24, 2015 15:56
-
-
Save glynrob/15383e4fc3fb61808ea5 to your computer and use it in GitHub Desktop.
An example of a strike profile with function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gen_rand_string | |
o = [('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten | |
(0...50).map { o[rand(o.length)] }.join | |
end | |
table :Users do |t| | |
t.display_name :name | |
t.email :email | |
t.password type: :string, string: gen_rand_string | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment