I have a rake task to generate a given amount of items in a xml file. If nothing is given I want to have a default. By now only 50 gets printed, but I would like to have a variable amount here, how would I call it from the command line?
namespace :utilites do
desc "generate xml"
task generate_xml: :environment do |t, args|
args.with_defaults(:length => 50)
p args[:length]
end
end