search for: person

Displaying 20 results from an estimated 24372 matches for "person".

2006 Mar 16
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 ("Manager") but the first works with an if statement (if person[:type] = "Manager"), the sec...
2006 Aug 16
update entry in a has_many relation
Hello all, I want to upate a entry in a one to many relation, but is doesn''t work. I can add or delete a specific entry, but I can''t update it. Can anyone help me? Here is the code: class Person < ActiveRecord::Base has_many :materials end class Material < ActiveRecord::Base belongs_to: person end class PersonController < ApplicationController def update person = Person.find(@params["id"]) = @params["name"] first_material...
2007 May 27
[NoMethodError] simple problem
I think this test should pass but it doesn''t 1) NoMethodError in ''Person should return full name'' undefined method `full_name?'' for #<Person:0x3567964> ./spec/models/person_spec.rb:43: describe Person do it "should return full name" do person = person.should be_full_name end end class Person < Acti...
2006 Jul 03
stopping error mailer on development
I sleep better with it in place in production mode and I only get one error notice - every once in a while for a problem that I have fixed in development branch that I am not ready to merge in the main trunk yet. I want to keep the error mailer code in place in development code for obvious reasons and even though I can set up filters for my mail system, how can I simply shut it off for development
2006 Apr 01
acts_as_list with scope : position update problem?
...'Robert'', 1, 1); INSERT INTO `people` VALUES (2, ''Brian'', 1, 2); INSERT INTO `people` VALUES (3, ''John-Paul'', 2, 1); INSERT INTO `people` VALUES (4, ''Grace'', 2, 2); class Family < ActiveRecord::Base has_many :people end class Person < ActiveRecord::Base belongs_to :family, :order => ''position'' acts_as_list :scope => ''family_id'' validates_uniqueness_of :position, :scope => ''family_id'' end Now, all this works fine, I can execute commands like person.move_high...
2005 Sep 29
Meet me conferencing without blind transfers (Asterisk@home)
Hi, I'm using Asterisk@home and am having trouble using the conference bridge that comes built in. We're using Polycom phones. When we transfer the first person into the conference room (e.g. 8101) , they get into the room fine. When we try to transfer a second person into the conference room, they get dropped as soon as we finish the transfer. This is using Polycom SoundPoint 301 phones. Now when we use a Polycom SoundPoint 501 phone, we have an opt...
2009 Sep 23
Bringing people into a conference
...e number and then the three of them would be in a conference. From there they should be able to bring in other people as well. This seems to be what the Asterisk n-way call HOWTO from voip-info is trying to do, but it doesn't work quite properly for me. Here's what happens: 1. Internal person A calls person B 2. Person A presses *0, he is given a dial tone and person B is taken to a conference room 3. Person A calls person C and they can talk, and then person A presses **. 4. Person C is brought to the conference room, but person A is disconnected. In the last step, A should be take...
2007 Mar 30
check_box_tag not passing 0 when unchecked?
Code: <%= check_box_tag("person[#{}][is_approved]", 1, true) %> Rendered output: <input checked="checked" id="person[7][is_approved]" name="person[7][is_approved]" value="1" type="checkbox"> Problem: The value of "1" is always passed, even if the...
2006 Jul 17
REST Relationship Models
I''m trying to figure out an elegant way to do this: I have the following three tables: people, employer, employees And consequently the following three models: class Person < ActiveRecord::Base end class Employer < ActiveRecord::Base has_many :employees end class Employee < ActiveRecord::Base belongs_to :person belongs_to :employer end I want to be able to say: @employee.lastname, instead of saying @employee.person.lastname Do I need to write indi...
2006 Aug 02
Self-Referential has_many :through
Hello all. I am trying to create a self-referential has_many :through. I used the following site as a guide but it still doesn''t appear to be working. I have two models. Person and Relationship. A person has many contacts (Which is another person) through relationships class Person < ActiveRecord::Base has_many :relationship has_many :contacts, :through => :relationship end end class Relationship < ActiveRecord::Base belongs_to :person, :foreign_ke...
2016 May 06
Resuming the discussion of establishing an LLVM code of conduct
...m since 2006 and according to the code of >>> conduct I would now be liable to being banned from working on llvm >>> because of sharing a satirical news. >> I think it's fair to say everyone involved in this discussion would find >> that a ridiculous conclusion. I personally am not too worried by the >> current wording, but are there particular changes which would set your >> mind at ease? Several folks have raised concerns about the section >> which reads "In addition, violations of this code outside these spaces >> may affect a perso...
2017 Nov 15
R6 object that is a list of referenced object
Dear community, I am having a class, let's say Person, Person <- R6Class("Person", public = list( idPerson = NULL, name = NULL, age = NULL, initialize = function(idPerson = NA, name = NA, age = NA) { s...
2006 Apr 18
how would you take the duplication out of this?
...any @company = Company.find(params[:id]) if and @company.update_attributes(params[:company]) flash[:notice] = ''Company was successfully edited.'' redirect_to :action => ''show'', :id => @company end end def edit_person @person = Person.find(params[:id]) if and @person.update_attributes(params[:person]) flash[:notice] = ''Person was successfully edited.'' redirect_to :action => ''show'', :id => @person end end it really bugs me th...
2006 May 14
object class with STI and Polymorphic Assoc''s.
Hi, lets say I have a a table, "Linkings" that I am using for polymorphic associations. One of the associations is to the "person" table, and there are several other associations. "Person" has 2 types, "slacker" and "suckup". It is modelled as such: class Linking < ActiveRecord::Base belongs_to :person belongs_to :linkable, :polymorphic => true end class Person < ActiveRecor...
2011 Jul 31
[LLVMdev] RFC: Exception Handling Rewrite
...----------- > // The 'landingpad' Instruction > // > > The 'landingpad' instruction replaces the current '' and > '' intrinsics. > > // Syntax: > > %res = landingpad<somety> personality<ty> <pers_fn> <clause>+ > > where > > <clause> := > cleanup > | catch<ty_1>,<ty_2>, ...,<ty_n> > | filter<ty_1>,<ty_2>, ...,<ty_m> > > and the result has the type '<somety&gt...
2009 Feb 05
A way to "lock down" the order of bars for ggplot "dodged" histogram for a "dodged" histogram based on whether or not a specific variable has a value in the first bin.   I would like to be able to absolutely force the order of the variables in the bin.  For example, say I have three variables Me, You, and Them.   Me_df<-data.frame(Data = c(1:15), Person = "Me") You_df<-data.frame(Data = c(10:20), Person = "You") Them_df<-data.frame(Data = c(15:25), Person = "Them") Group_df_tmp<-rbind(Me_df,You_df) Group_df<-rbind(Group_df_tmp,Them_df) counts <- ddply(Group_df, .(cut(Data, breaks=fullseq(range(Data), 5)...
2005 Dec 29
Many-to-Many: Where to add the children?
I have two classes Person and Job defined as follows: class Person < ActiveRecord::Base :has_and_belongs_to_many jobs def add_job(job_name) job = Job.find_by_name(job_name) # See if this job exists if job.nil? # If this job doesn''t exist job =
2006 May 26
Breakdowns in has_many abstraction
...are completely different except for their ids, the collection remains unchanged. So that''s a weird behavior, too. Why is it like that? Here''s my simplified test case, part of a new Web 2.0 app, Rain''d. :-) The umbrellas are all named, and we want to make sure that each person has uniquely-named umbrellas. class Person < ActiveRecord::Base has_many :umbrellas def validate errors.add("umbrellas", "must be uniquely named") unless no_duplicate_names? end def no_duplicate_names? names = umbrellas.collect {|u|}...
2006 Apr 14
ActiveRecord and multiple associations
Hello, I have a Company that has_and_belongs_to_many Persons. A Person has_many Emails. I want to display each Person''s Email for each Company, so I try this: companies = Company.find(:all) for company in companies persons = company.persons for person in persons puts end end Unfortunately, this doesn''t work...
2017 Nov 16
R6 object that is a list of referenced object
See below. On Wed, 15 Nov 2017, Cristina Pascual wrote: > Dear community, > > I am having a class, let's say Person, > > Person <- R6Class("Person", > public = list( > idPerson = NULL, > name = NULL, > age = NULL, > initialize = function(idPerson = NA, name = NA, age = NA...