views:

24

answers:

1

I'm having a few integration issues. I have 2 models which need to be mapped so as to enable them to talk to the same table. So one model has a few attributes that are mapped to the corresponding columns in the table and likewise for the other model.

I've heard of aliasing, a technique that can be used. Help would be appreciated. Thanks !

+2  A: 

You create your two model and define the same table_name

  class ProjectComplete < ActiveRecord::Base
    set_table_name "projects"
  end

  class ProjectLittle < ActiveRecord::Base
    set_table_name "projects"
  end
shingara