How to know objects' methods?

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

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

John

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/
  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