RoR nuby Ok, I know that RoR < ActiveRecord doesn''t support Compound Keys out of the box. I figured I would have to manually code a number of methods to override the default :id support. Source: class ContractCoverages < ActiveRecord::Base set_table_name "contract_coverages" set_primary_key "contract_id, coverage_id" end I was thinking - find -update -new What''s weird is I can''t find any examples. Anybody got some suggestions? Thanks, Jason --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Don''t do it yourself when it''s already available. http://compositekeys.rubyforge.org/ It works...I tried it from some stuff I needed to do for a legacy project. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Steve, Thank you. I''d see Dr. Nic''s stuff, but I hadn''t noticed the CompositeKey plugin. I''m on it. Thanks, Jason On Dec 10, 10:01 am, Steve Keener <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Don''t do it yourself when it''s already available. > > http://compositekeys.rubyforge.org/ > > It works...I tried it from some stuff I needed to do for a legacy > project. > > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---