Dear All,
Can i declare a primary key field name as us_id? instead of Id.
Regards
Devi.R
Dear All,
Can i declare a primary key field name as us_id? instead of Id.
Regards
Devi.R
On Sat, Mar 28, 2009 at 5:40 AM, Craig D.
[email protected]wrote:
Craig
–
Craig D.
Mutually Human Software
http://mutuallyhuman.com
If you do decide to override the primary key, it will be your
responsibility
to set it to a unique before
you perform a save operation on a new row.
-Conrad
You can call set_primary_key:
class MyModel < ActiveRecord::Base
set_primary_key “us_id”
end
See:
http://www.railsbrain.com/api/rails-2.3.2/doc/index.html?a=M002340&name=set_primary_key
Regards,
Craig
–
Craig D.
Mutually Human Software
Thanks you for your reply. Now it’s working.
On Sat, Mar 28, 2009 at 5:55 AM, Conrad T. [email protected]
wrote:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs