similar to: self-referential tags, has_many_polymorphs

Displaying 20 results from an estimated 2000 matches similar to: "self-referential tags, has_many_polymorphs"

2007 Nov 29
0
has_many_polymorphs for user owned tags
Hi all, I''m trying to extend the tagging functionality of has_many_polymorphs to work with user owned tags - ie, putting belongs_to :user in the Tagging model. So I changed the index in the generated migration, and added user_id to the taggings table. Then I added belongs_to :user in the Tagging model. In the lib/tagging_extensions.rb file I added a new function: def
2006 Mar 10
1
Validate fields and display errors from two models?
Hi, I have here a problem I''ve been working at for a little while but I can''t seem to get the error messages to appear correctly. My form looks something like this for "ModelA": [errors_for "modelA"] [form for "modelA"] [text "modelA" "fieldname1"] [text "modelB" "fieldname2"] [submit] [/form] The reason
2007 Nov 14
1
has_many_polymorphs and acts_as_list ?
First, BRAVO for this wonderful plugin: has_many_polymorphs ! Now my problem: 4 models : Collection, Page, Fragment, Belonging (which is the join table): 1 class Collection < ActiveRecord::Base 2 has_many_polymorphs :elements, 3 :through => :belongings, 4 :from => [:pages, :fragments, :collections], 5 :as => :collector, 6 :parent_order =>
2008 Mar 05
4
has_many_polymorphs is breaking my spec file
Hey folks I have a bunch of classes that are polymorphs, with has_many_polymorphs (they are all ''labellable'', which is similar to being ''taggable'' in the acts_as_taggable scheme). I have a couple of modules, LabellableInstanceMethods and LabellableClassMethods in a file called labellable_methods.rb. The classes all get labelled with
2009 Oct 28
2
regression on large file
Dear R community, I have a fairly large file with variables in rows. Every variable (thousands) needs to be regressed on a reference variable. The file is too big to load into R (or R gets too slow having done it) and I do now read in line by line with "scan" (see below) and write the results to out. Although improved, this is still very slow... Can someone please help me and suggest
2005 Oct 31
2
Cascading Comboboxen and GO button ?
Hello all, I have two comboboxen, comboA is popultaed when :controller/list is retrieved first time. When comboA is selected, I want to auto-populate comboB (modelB belongs_to modelA). The population of tableC (modelC belongs_to modelB and belongs_to modelA) should not populate until a "GO" button is clicked (link_to with submit). Help? I need an example of how to filter the post
2009 Oct 12
1
Speed up and limit memory usage of lm()
Hi all I have been doing series of linear regression models lm(). In this case the execution time and memory usage becomes a huge issue. I have therefore been trying to speed the process and limit the memory usage. Here follows part of the code do give better understanding of what I am doing: modela <- lm(RSSYS10 ~ RS_AGE + RS_AGESQ + SEX + RS_BMI) frssys <-
2008 Jun 30
0
Making a copy of a model and all its associated records.
Hi all, I have a question regarding the duplication of a model and it''s associations. For example, if I have ModelA and it has_many SubModelAs and has_many SubModelBs associated with it. Each of the SubModels a belongs to ModelA. Is there a quick way of copying ModelA and the structure that lays below it? In the end I''ll then end up with ModelB which is a copy of A, and it has
2006 Feb 25
0
self referential habtm using join tables
All: I have been working on making a self-referential habtm relationship that uses a join model because I want to store info about the relationship. I have been using two sections from Chad Fowler''s "Rails Recipes" as a guide, "Self-referential Many-to-Many Relationships" and "Many to Many Relationships Where the Relationship Itself has Data". So far I have
2006 Feb 27
0
self-referential many-to-many using a join model
Hello! I have been working on making a self-referential habtm relationship that uses a join model because I want to store info about the relationship. I have been using two sections from Chad Fowler''s "Rails Recipes" as a guide, "Self-referential Many-to-Many Relationships" and "Many to Many Relationships Where the Relationship Itself has Data". So far I
2006 Aug 02
2
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 http://blog.hasmanythrough.com/articles/2006/04/21/self-referential-through 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
2006 Mar 31
1
model comparison with mixed effects glm
I use model comparison with glms without mixed effects with anova(modelA,modelB), with mixed effects glm (glmmPQL), this doesn't work. Is there a way to compare model fits with glmmPQL's? Paula M. den Hartog Behavioural Biology Institute of Biology Leiden Leiden University [[alternative HTML version deleted]]
2012 Oct 22
0
[LLVMdev] Self-referential instruction from jump threading
Hi Hal, > After investigating PR14133, I've discovered that jump threading can output self-referential instructions: > %inc.us = add nsw i32 %inc.us, 1 such instructions are valid in unreachable basic blocks. > At least in the test case for that bug report, the relevant code is later deleted (perhaps it is unreachable), and so this does not cause a problem. Unfortunately, when
2012 Oct 22
0
[LLVMdev] Self-referential instruction from jump threading
Hal Finkel wrote: > Hello, > > After investigating PR14133, I've discovered that jump threading can output self-referential instructions: > %inc.us = add nsw i32 %inc.us, 1 > > At least in the test case for that bug report, the relevant code is later deleted (perhaps it is unreachable), and so this does not cause a problem. Unfortunately, when vectorization is enabled, this
2006 May 20
7
Polymorphic, many-to-many, self-referential data model
No matter what I try I''ve been unable to work how to get this to work with the cool ActiveRecord helpers. I''m not sure if it''s possible, Josh Susser''s blog suggests it is, but damned if I can work it out... I have: Container which can contain one or more Element. An Element is a polymorph of either a Container or a Chunk. An Element can exist in one or more
2006 Jul 20
1
self referential xml using builder
Hi listers, I''m trying to build an xml doc using Builder, but I''m having trouble getting it to draw a tree structure from a self-referential table. Here''s what I''m after: ========================== ---- object structure ---- node (name => root) - node (name => child 1) - node (name => child 2) - node (name => child 2.1) - node
2006 May 02
0
Self-referential MtoM implementation
ok, guys i have followed the self referential recipe from the book it works perfect but now i have some doubts, at the end the model are modified to force the user beign added as a friend that add too who are adding him so how i can make that the full relationship doesn?t be complete until the friend beign added approves it(talking in the implementation of the code of course)? by the way,
2006 Apr 17
0
Pros/cons of doubling up in Self-Referential has_many via :through
Relative newbie so would welcome comments re structure of a self-referential relationship I''ve got. It''s started off similar to the Person HABTM friends in the Rails recipes books (working fine), but I needed to turn the join table into a full-blown model as I wanted to add attributes to it. Few tricky bits dealing with the new :through structure and understanding how :scope
2008 Jan 23
1
Self-referential HABTM SQL mal-formed when updating record
Guys, Anyone ever had this kind of problem with ActiveScaffold? Cheers, Sazima ------------------------------------------------------------------------------------------------ What steps will reproduce the problem? 1. Create self-referential HABTM application (like the common "user has friends" example) 2. Try to add more than 1 friend to a given user using ActiveScaffold. What is
2007 Jul 26
1
Bi-directional self-referential HABTM
Hi, I''m having a little trouble figuring out how to make a self- referential HABTM bi-directional. I have a Employee class. Each employee can have a couple of bosses, who are also employees. The employee class has the following HABTM: has_and_belongs_to_many :bosses, :class_name => "Employee", :join_table => "bosses_courses", :association_foreign_key =>