Domanda

# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)

Dummy::Application.load_tasks

Given the above when making an engine, this dummy application also loads the engines tasks located in /lib/tasks as well. How does it do this? I can't seem to find where load_tasks is defined or how it works..

Any advice would be great.

È stato utile?

Soluzione

Type:

gem which rails

How is this? If you get /path/foo/gems/railties-4.0.0/lib/rails.rb or something, find there.

find /path/foo/gems/railties-4.0.0/lib -type f | xargs grep load_tasks
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top