I would like to create some models with random attributes, albeit within some limits. What is the proper way of doing this in the migrations and is there a better suited type than integer for numbers less than 1000? I’m thinking of sth like below:
class X < ActiveRecord::Migration
def up
add_column :things, :integer, :default => "a number between 5 and 12"
end
You can do something like: