I am a beginner in Ruby on Rails.
I would like to make the following database model:
Package (has_many packagelines)
Packageline (belongs_to package)
The package line can be one of 3 things: entity, item or service, so I
would like to have a line type with the options entity, item or service.
I also want a field where I store the foreign key. The problem is that
the foreign key is dependent on what is selected in the line type field.
Can somebody tell me how I can manage this.
Thanx!
--
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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/78bc09629c568c82ba07754ccb0ec5ef%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment