Hi I have tables 1)sd_impacts id integer not null name character varying(80) 2)sd_urgencies id integer not null name character varying(80) 3)sd_priorities id integer not null name character varying(80) 4)sd_prioritizations id integer service_desk_impact_id integer service_desk_urgency_id integer service_desk_priority_id integer Here all these tables are master tables.In sd_prioritizations table service_desk_impact_id and service_desk_urgency_id jointly detects priority id. So in the view 2 select boxes are there for service_desk_impact_id and service_desk_urgency_id..Based on which value combination we select, a text box displays sd_priority id . So what relation should I define in the model SdPrioritization? Sijo -- 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 -~----------~----~----~----~------~----~------~--~---
Sijo Kg wrote:> Hi > I have tables > > 1)sd_impacts > id integer not null > name character varying(80) > > 2)sd_urgencies > id integer not null > name character varying(80) > > 3)sd_priorities > id integer not null > name character varying(80) > 4)sd_prioritizations > id integer > service_desk_impact_id integer > service_desk_urgency_id integer > service_desk_priority_id integer > > Here all these tables are master tables.In sd_prioritizations table > service_desk_impact_id and service_desk_urgency_id jointly detects > priority id. > So in the view 2 select boxes are there for service_desk_impact_id and > service_desk_urgency_id..Based on which value combination we select, a > text box displays sd_priority id . > > So what relation should I define in the model SdPrioritization? > > Sijo >Probably this... class SdPrioritization < ActiveRecord::Base has_many :sd_urgencies has_many :sd_impacts -- http://www.5valleys.com/ http://www.workingwithrails.com/person/8078 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---