search for: people_ids

Displaying 8 results from an estimated 8 matches for "people_ids".

Did you mean: people_id
2006 Feb 20
0
How to reference a field of an associated object in a text_field
...names, addresses, and the classes they want to register. I am trying to uniquely identify the first and last names of the two registrants in my form so that the rails magic will work for filling in the relationships. I saw that for checkboxes, you can do <%= check_box("registration[people_ids][]", "last_name", ..... and that will make rails do the magic to populate the people_ids for each instance of the person and last_name field. It doesn''t seem to work for text fields, e.g. <%= text_field ("registration[people_ids][]", "last_name") %&...
2005 Dec 23
0
Problem with large join table and ActiveRecord
Hello, I''m having a hard time explaining this, so I hope i can say this correctly. I have these tables: people id fname lname departments id name buildings id name room wtkeys id key_number key_way Issued_keys id people_id department_id building_id wtkey_id date_issued My
2006 Sep 13
1
insert a date like 2006-00-00
Mysql makes possible to insert a date like 2006-00-00. And i want to do that, if my client dont knows the month he puts it to zero. But when i do something like this: fp = ProfessionalFunction.new(:people_id => 5, :start => "2006-12-0") fp.save it puts a NULL value in the start field (type date). suggestions?? --~--~---------~--~----~------------~-------~--~----~ You received
2006 Jul 28
2
has_many :through with multiple paths
Hi all. I am currently thinking about how to do the following: I have the following models. Team Person Team has various positions (manager, programmer etc.) I would like each one of those positions to reference one or more Person records. A single Person record could be on 6 different teams at the same time in different roles. the same person could even be on the same team multiple times
2007 May 28
5
CTI in ActiveRecord
I search an plugin or gem, but don''t find nothing satisfactory. I believe to be stranger a technology that nails the DRY, have that create you vary equal tables, instead of using inheritance. Exists an soluction for this? I want a solution similar to this: create_table :people |t| do t.column :name t.column :address end create_table :customer |t| do t.column :person_id
2006 Feb 20
0
No Magic for HABTM forms?
...TWO attendees, so the form has entry fields for two people. I wanted the controller to be able to create those two people automatically when it got the form submission. It seemed like the variable names in the form could support that with [] names, for example, text_field("registration[people_ids][]", "first_name" .... But it seems it can''t do that, so I used text_field_tag in the form like so: text_field_tag("registration[people][1][first_name]" ... text_field_tag("registration[people][2][first_name]" ... Then my registration_controller hand...
2008 Feb 12
8
has_many through question
I have made 3 tables +------------+ +----------------+ +------------+ |people | |people_campaigns| |campaigns | +------------+ +----------------+ +------------+ |id :int | <----> |people_id :int | /-> |id :int | |name :string| |campaign_id :int| <-/ |name :string| |etc ... | |exported :int |
2006 Jan 19
5
limits of has_and_belongs_to_many
I''m experimenting with Rails on the Recipes example first before I dive into applying it to my intended application. I''m exploring which will be more work: to rename all the primary id''s in the legacy database, or to work around the fact that the primary id''s are not called ''id'' within RoR instead. I''ve been successful in using a