[Rails-core] Re: Creating non standard primary key a confusing and does not work with primary key of type 'string'

2010-07-08 Thread Neeraj Singh
Hi Ken, My intent is to fix the code. However before that I want to verify that I am on the right path. As I have shown in case if I am not happy with my primary key being id and if I want my primary key to be car_id of type 'string' there is NO way I can do that. The only way is to have my

Re: [Rails-core] Re: Creating non standard primary key a confusing and does not work with primary key of type 'string'

2010-07-08 Thread Ken Collins
Neeraj, Your missing my point. When you say there is NO way I can do that, your are incorrect. There is no way you can do it in your examples because you are taking the :primary_key option to mean something else other than how the documentation specifies – a simple way to rename the auto

[Rails-core] Re: Creating non standard primary key a confusing and does not work with primary key of type 'string'

2010-07-08 Thread Neeraj Singh
I see you point. And I agree. However I still think that rails should take some of the responsibility and should clarify to user following things. 1) create_table :users, :id = false, :primary_key = :user_id do |t| t.integer :user_id t.string :name t.timestamps end Rails should throw an

Re: [Rails-core] Re: Creating non standard primary key a confusing and does not work with primary key of type 'string'

2010-07-08 Thread Matt Jones
On Jul 8, 2010, at 2:23 PM, Neeraj Singh wrote: I see you point. And I agree. However I still think that rails should take some of the responsibility and should clarify to user following things. 1) create_table :users, :id = false, :primary_key = :user_id do |t| t.integer :user_id t.string