I have a helper method (create_employee) inside of a Rake task that I would like to use inside a Rails controller.
lib/taks/billing.rb
require 'rake'
task :billing => :environment do
//logic in task
end
create_employee args1
//logic to create new employee
end
How can I call this method within a Rails Controller?