Rails api doc - understanding & finding -


i trying find functions in rails api docs. example, in console can type in:

activerecord::base.connection.tables

activerecord::base.connection.indexes("sometable")

and list of tables , list of indexes. in rails api doc http://api.rubyonrails.org/classes/activerecord/base.html cannot find reference either of these.

i find connection() trail ends there! little figuring out apis!

thanks...

activerecord::base#connection internally relies on activerecord::base.connection (class method) return concrete implementation of activerecord::connectionadapters::abstractadapter class.

you should search #indexes method in concrete adapter, instance postgresqladapter#indexes.

rdoc doesn't provide hint on object type returned method call. should dig source code or have deep understanding of package itself. there alternatives such yard generates more complete api documentation.

there's rails searchable api doc project offers searchable rails api. can enter method name , have list of objects implementing method.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -