Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
filters = populate(Filter, 4) do |filter|
filter.title = words
filter.service = services.rand
(2+rand(3)).times do
filter.options << FilterOption.new(:filter => filter, :value => words)
end
end
display_amount(FilterOption)
company_services = populate(CompanyService, 3) do |company_service|
company_service.company = companies.rand
company_service.service = services.rand
rand(3).times do
company_service.prices.build(
:company_service => company_service,
:title => sentence,
:value => rand_price,
:valid_from => (rand(10) + 1).days.ago,
:valid_until => DateTime.now + rand(20).days
)
end
company_service.service.filters.each do |filter|
company_service.filter_options << filter.options.rand
company_service.save!
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.