Phlip
2/9/2008 4:00:00 AM
grz01@spray.se wrote:
> create_table :items do |t|
> My question is: Where is this method 'create_table' defined in Rails?
Part of learning Rails is learning to find its source code,
documentation, and forums.
The best forum is Google's Ruby-on-Rails Talk forum. Google for that.
Next, learn to use www.google.com/codesearch to go directly to source,
formatted for programmers. Search like this:
def\ self\.create_table
Google codesearch supports regular expressions, so \ declares the space
is important, and likewise the \. dot.
Your command line might support this:
$ ri create_table
$ ri ActiveRecord::ConnectionAdapters::SchemaStatements#create_table
The first one told me where to look for create_table, and the second told
me much more than I ever wanted to know about it!
Finally, learn to use grep in your Rails source folders. Rails is well
documented, including in its own source, so you'd better get familiar
with reading it!
Post any future Rails questions to that Google Group, to avoid offending
the 0.02% of this forum who was here before Rails. (-:
--
Phlip
watch this space for more assert{ 2.0 } goodness!