search for: person_types

Displaying 7 results from an estimated 7 matches for "person_types".

Did you mean: person_type
2006 Feb 15
10
STI Question
Hi everyone, I have 3 types of people (for now): Staff Faculty Students To break them up into classes, but keep them in the same People table, I''ve broken them up like so (code and ''ends'' snipped): class Person < ActiveRecord::Base class Employee < Person class Staff < Employee class Faculty < Employee class Student < Employee So, when I insert
2006 Mar 16
9
Help needed on STI syntax
Struggling a little with getting the syntax right for a STI model. Prob just being a bit dense. Couple of questions I''m hoping you guys can answer: Assume here I''ve got: class Person class Manager < Person class Slave < Person 1) How does person[:type] differ from person.type when type is the column used to specify the subclass. They seem to output the same
2006 Jan 02
13
Naming Conventions
So, RoR is better at grammer than I. Well so is my nine year old. If I have a table named "people_type" will Rails see this as singular because of the _type or will it consider it the plural of "person_type" ? Is there a link to Rails that lists what words it knows, or what words not to use in table design etc. Kindest regards. -- Posted via http://www.ruby-forum.com/.
2006 Jun 22
2
Setting an index on a collection_select
...d like to do the same with a collection_select, but can''t seem to get it to work. Does anyone know if there is an elegant way to set the "index" attribute of a collection_select? Something like: <%= collection_select(''person'', ''type'', @person_types, ''id'', ''name'', ''index'' => 1) %> Here''s the documentation for the text_field that describes the index property http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#M00038 9 Thanks, Jeff Dean www.je...
2006 Jan 05
6
Inheritance Question
Hi, My application has a table of People that has information about them, and I want to have a subset of those people as Users - people that can login to the application. What is the best way to do this? Add columns to People that only Users would use? I''ve read the threads on single table inheritance, but it seemed a little bit wasteful: 10,000 people vs 50 users For those more
2006 May 27
0
newbie question: creating views to submit values
Apologies for such a basic question. I''ve wracked my brain on this a couple days so if anyone takes pity, please help me out. I''ve been looking at STI (Single Table Inheritance) at the Rails Wiki and decided to try it out. I got it working in the model and controllers but can''t figure out how to make a proper view that will take the values and add them into the
2006 Mar 21
7
Nuube Sequence problem
In my database the id for a field is 810. RoR thinks that it is 809. My log file (below) shows that just before the insert it grabs the next sequence value. I dont think it should do that. This causes problems further down the line when trying to access the Person object. Development Log file : "SQL (0.016000) select people_seq.nextval id from dual Person Create (0.015000) INSERT