all:
所有:
I know how to show all the tasks by typing rake -T
, and I know how to add my own tasks by add rake files under RAILS_ROOT/lib/tasks. But if I want to view the source code like rake db:migrate
or rake doc:app
to see how they work, where can I find those codes?
我知道如何通过输入rake -T来显示所有任务,我知道如何通过在RAILS_ROOT / lib / tasks下添加rake文件来添加我自己的任务。但是如果我想查看像rake db:migrate或rake doc:app这样的源代码来查看它们是如何工作的,我在哪里可以找到这些代码?
thank you all :)
谢谢你们 :)
eddie
埃迪
2 个解决方案
#1
31
All rails internal rake tasks are in railties/lib/rails/tasks
所有rails内部rake任务都在railties / lib / rails / tasks中
#2
3
All rake tasks of database is in active record.
数据库的所有rake任务都处于活动记录中。
https://github.com/rails/rails/blob/f47b4236e089b07cb683ee9b7ff8b06111a0ec10/activerecord/lib/active_record/railties/databases.rake
#1
31
All rails internal rake tasks are in railties/lib/rails/tasks
所有rails内部rake任务都在railties / lib / rails / tasks中
#2
3
All rake tasks of database is in active record.
数据库的所有rake任务都处于活动记录中。
https://github.com/rails/rails/blob/f47b4236e089b07cb683ee9b7ff8b06111a0ec10/activerecord/lib/active_record/railties/databases.rake