Forum: Ruby on Rails Question: Writing migration code

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
620c12639078ea2dde8a3b50ccee4c05?d=identicon&s=25 Dark Ambient (Guest)
on 2006-06-07 15:39
(Received via mailing list)
Just started learning on rails.  The first few time I edited a migration
file it was using colons like:

create_table :table do |t|
      t.column :column, :string


Now I'm working on a tutorial where it's using quotes for the table and
column names:


reate_table "table" do |t|
      t.column "column", :string

Are these two ways interchangeable ? Is there a preferred ?

TIA
Stuart
A2c85dc5ee81b12e3cc0a6522e8d079d?d=identicon&s=25 Chris Hall (Guest)
on 2006-06-07 18:18
(Received via mailing list)
short/quick answer: yes, they are interchangable, however, symbols (what
you
refer to as colons) are preferred in certain cases.

http://glu.ttono.us/articles/2005/08/19/understand...
This topic is locked and can not be replied to.