如何查看ActiveRecord :: Base,ApplicationController :: Base和ActiveRecord :: Migration提供的所有方法的列表。
答案 0 :(得分:0)
如果你想要文件,我推荐apidock.com
http://apidock.com/rails/ActiveRecord/Base
http://apidock.com/rails/ActionController/Base
http://apidock.com/rails/ActiveRecord/Migration
另一方面,您可以在rails控制台中获取所有方法。
在终端中,转到rails项目文件夹。正在运行rails c
ActiveRecord::Base.methods #Get all class methods of ActiveRecord::Base
ActiveRecord::Base.instance_methods #Get all instance methods of ActiveRecord::Base
ApplicationController::Base.methods
ApplicationController::Base.instance_methods
ActiveRecord::Migration.methods
ActiveRecord::Migration.instance_methods