Different id_field

Hi,
In my table there is no id field,i.e. I have the field with the name
id_host
then how to use that field in my application without changing the field
name.

Hi,

On Apr 3, 2009, at 10:12 AM, Sushrut S. wrote:

Hi,
In my table there is no id field,i.e. I have the field with the name
id_host
then how to use that field in my application without changing the
field
name.

Assuming you mean Rails, you may have better luck next time asking on
their list. Try this:

class ModelName < ActiveRecord::Base
set_primary_key “id_host”
end

  • Stephen

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs