Skip to content

Instantly share code, notes, and snippets.

@glynrob
Created January 24, 2015 15:56
Show Gist options
  • Save glynrob/15383e4fc3fb61808ea5 to your computer and use it in GitHub Desktop.
Save glynrob/15383e4fc3fb61808ea5 to your computer and use it in GitHub Desktop.
An example of a strike profile with function
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