add_index for multiple fields of a model not possible on the same line?

Oh boy, bad timing. Hitting some annoyances at the time I am about to grab the $29 offer on RM.

I am coding a little migration after having created it. Imagine the control is in self.up method of the migration:
I do: add_index :users, <Ctrl+Space> and all it shows is :unique, does not show the other field (:email) this model (User) has.
As a result, I have to split the declaration:

    add_index :users, :email, :unique => true

in two:

add_index :users, :name, :unique => true

add_index :users, :email, :unique => true

Where am I going wrong?

1 comment
Comment actions Permalink

Where am I going wrong?


You are right, that is a bug. Completion expect only one column name there. I've filed an bug report -
Thank you for a feedback.


Please sign in to leave a comment.