Forum: Ruby on Rails Wrong number of arguments (2 of 0)

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.
018b3c8f428a528431a2ccd65b4d37e4?d=identicon&s=25 Thierry Delbart (thithi32)
on 2008-10-24 18:37
I'm new with RoR.
I have a simple migration file:
class CreateClubs < ActiveRecord::Migration
  def self.up
    create_table :clubs do |t|
        t.columns :name, :string
      t.columns :ref, :string
      t.columns :description, :string
      t.columns :local, :string

      t.timestamps
    end
  end

  def self.down
    drop_table :clubs
  end
end

But I get this error message:

[..]
Wrong number of arguments (2 of 0)
./db/[..].rb:4:in 'columns'
[..]

What am I missing?
Thank you for your help.
018b3c8f428a528431a2ccd65b4d37e4?d=identicon&s=25 Thierry Delbart (thithi32)
on 2008-10-24 18:40
Juste before trying to migrate thie table clubs, I did it fine with
league:

class CreateLeagues < ActiveRecord::Migration
  def self.up
    create_table :leagues do |t|
      t.columns :name, :string
      t.columns :ref, :string
      t.columns :description, :string
      t.columns :category, :string

      t.timestamps
    end
  end

  def self.down
    drop_table :leagues
  end
end
2505b282d57c29be797dc35b245adb4c?d=identicon&s=25 Philip Hallstrom (Guest)
on 2008-10-24 19:30
(Received via mailing list)
On Oct 24, 2008, at 9:40 AM, Thierry Delbart wrote:

>      t.columns :category, :string
Shouldn't that be "t.column"? (no 's').  Or maybe even...

t.string :name
....
This topic is locked and can not be replied to.