search for: person_typ

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

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....
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
...#39;'create'' %> <%= render :partial => ''form'' %> <%= select (:friend, :create, :friend_type, %w{ Soulmate Family }) %> <%= submit_tag "Create" %> <%= end_form_tag %> The STI wiki says add: <%= hidden_field_tag "person_type", @person[:type] %> but this makes no sense to me. I''ve basically been taking stabs in the dark. It would be nice if someone can point me in the right direction for understanding views as well. Again, my apologies for asking all this basic stuff. Sam
2006 Mar 21
7
Nuube Sequence problem
...k 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 INTO people (title, weight, mothers_maiden_name, shoe_size, middlename, person_type, username, firstname, height, person_id, createdby, expired, name_string, surname) VALUES(''Mr'', ''100'', '''', 10, ''T'', null, null, ''T'', '''', :id, ''Chris Richards'', 0, null,...