Rake tasks Flashcards
1
Q
How to create rake task with params? And run?
A
namespace :sample do task :import, [:filename, :another] do |_t, args| # ... p args[:filename] # hello p args[:another] # world end end
# without quates and spaces rake sample:import[hello,world]