# How to know objects' methods?

**URL:** <https://www.ruby-forum.com/t/how-to-know-objects-methods/109879>\
**Category:** Rails\
**Created:** [July 19, 2007, 10:05pm UTC](https://www.ruby-forum.com/t/how-to-know-objects-methods/109879 "2007-07-19T22:05:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [July 19, 2007, 10:05pm UTC](https://www.ruby-forum.com/t/how-to-know-objects-methods/109879/1 "2007-07-19T22:05:30Z")

</div>

Hi,

I’m discovering Ruby on Rails and I’m limited with the fact that I don’t  
know which methods are available on the different objects provided by  
the framework.

For example I use the following code to create my table:  
create\_table :my\_table do |t|  
t.column “title”, :string  
end  
I know that the column method exists for this object because I saw some  
examples on the Net … How can I know all the methods available for  
this object (table object I guess?).

Thanks for any help. I presume it is a very basic question but I didn’t  
find the answer in the Ruby on Rails tutorials.

John

---

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [July 19, 2007, 10:13pm UTC](https://www.ruby-forum.com/t/how-to-know-objects-methods/109879/2 "2007-07-19T22:13:39Z")

</div>

I have in fact the answer to my question: [http://api.rubyonrails.org/](http://api.rubyonrails.org/)  
I will now spend a lot of time on it!

John

---

<div class="post-metadata">

**Author:** ![captaffy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f04885/32.png) [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Post date:** [July 19, 2007, 10:19pm UTC](https://www.ruby-forum.com/t/how-to-know-objects-methods/109879/3 "2007-07-19T22:19:53Z")

</div>

On Jul 19, 2007, at 15:05 , John S. wrote:

> I’m discovering Ruby on Rails and I’m limited with the fact that I  
> don’t  
> know which methods are available on the different objects provided by  
> the framework.

You can find this information via couple of methods:

1. the Rails documentation: [http://api.rubyonrails.org/](http://api.rubyonrails.org/)
2. use the #methods and #instances\_methods methods on any object.  
These methods return arrays of the available methods.

I think 1) is your best bet.

Michael G.  
grzm seespotcode net
