search for: has_may

Displaying 5 results from an estimated 5 matches for "has_may".

Did you mean: has_many
2007 Feb 18
0
Newbie question on has_may : through and link_to
Ok. This is a stupid newbie question. We have a database which has tables of topics, countries, countrynotes and countrynotes_topics (Any countrynote can relate to multiple topics and any topic can relate to multiple country notes, each countrynote can relate to only one country). What I want to do is when I show the index of topics, each topic will have a link_to that will generate a index page
2006 Apr 02
7
RANT: belongs_to -> refers_to
Every once in a while, I pipe up and whine that "belongs_to" should really be ''refers_to" [http://dev.rubyonrails.org/ticket/2130]. It''s time again. I''ve got a bunch of stuff going onto eBay, so, like any good engineer, I don''t just post it manually: I design a Rails-based inventory database that creates a semantically-correct XHTML/CSS auction
2007 Aug 01
2
map.resources with habtm
Hi I''m trying to use restful resources with recipes and ingredients I''ve set up the models using scaffold_resource. A recipe can have many ingredients and an ingredient can be in many recipes. I''ve set the relationships up using a through. I now want to display a recipe with a list of ingredients but I''m unsure how to proceed. Should I use nested resources and
2006 Feb 03
3
My associations are coming out nil.
I''ve got a fairly simple system with a table for my Users that includes a CountryId field which looks up to the CountryId field of my Country table. What I would like to happen is for my Rails application, which contains models for both User and Country, to be able to draw the dropdown list of available countries on the edit page, like it does in all the tutorials. My model classes look
2008 Dec 22
7
Help creating and using database
I have this problem. I have a Job table in my db, and each job has many steps (table Step). Is not possible to know how many steps a job has until it is created. So when I create a new job I have a problem: I can not have a step_id in my Job table, because it can be one step or more. What can I do? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~