Displaying 20 results from an estimated 6000 matches similar to: "STI functionality, but then with multiple tables"
2006 Mar 05
1
Help with Self-Referential HABTM
With the help of the Rails Recipes have got a self-referential HABTM
relationship working, but I''m really struggling with getting a new entry
from a form accepted. i should say here that the form is also submitting
info for the join table too.
So in my model I have:
class Type < ActiveRecord::Base
has_and_belongs_to_many :subtypes,
:class_name => ''Type'',
2009 Jan 20
1
two-sample test of multinomial proportion
Hi all,
This is perhaps more a statistics question than an R question, but I
hope it's OK anyhow.
I have some data (see below) with the number of tests positive to
subtype H1 of a virus, the number of tests postive to subtype H3, and
the total number of tests. This is for two different groups, and the
two subtypes are mutually exclusive.
What is the best way to test if the proportion of H1
2011 Mar 25
2
library(foreign) read.spss warning
I got the following:
> library(foreign)
> swal = read.spss("swallowing.sav", to.data.frame =TRUE)
Warning message:
In read.spss("swallowing.sav", to.data.frame = TRUE) :
swallowing.sav: Unrecognized record type 7, subtype 21 encountered in system file
>
The bulk of the data seems to read in a usable form, but I'm curious about what might be getting lost
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
2013 Jan 05
1
[LLVMdev] LLVM triple and Apple ld64 behavior
Hello,
I wanted to know about the reasons Apple dropped the support for "arm" target in its ld64. After searching in the sourcecode I found out that ld64 supports armv4 armv5 armv6 armv7 and its subtypes. The code shows that -force_cpusubtype_ALL for ARM targets is no more supported in "src/ld/options.cpp") and static const ARMSubType ARMSubTypes[] doesn't include
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
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
2011 Jul 20
2
polymorphic assoc seems only best for multiple parents ?
I have done a little polymorphic associations stuff and have
refreshed my memory on it again.
What it seems like is that if I have a particular record and I want to
make it easy for many different parent records to associate with it
using has_one or has_many, that is fine.
If I want a parent record to have multiple kinds of children through
one association, I don''t see how to do that
2018 Mar 07
1
Show all audiance in Icecast directory... cluster ?
Hello,
I installed Icecast 2.4.3 by downloading
http://downloads.xiph.org/releases/icecast/icecast-2.4.3.tar.gz
CentOS 7
Then
./configure
make
make install
Its working.
My only issue : I have 3 streams, I see the name of my station 3 times in
Icecast directory. I tryed to hide 2 streams by using the hidden and public
tags and force showing the total of audiance in the one public stream. i
2018 Jan 16
1
[RFC PATCH v2 2/5] iommu/virtio-iommu: Add probe request
Hi Jean-Philippe,
On 17/11/17 19:52, Jean-Philippe Brucker wrote:
> When the device offers the probe feature, send a probe request for each
> device managed by the IOMMU. Extract RESV_MEM information. When we
> encounter a MSI doorbell region, set it up as a IOMMU_RESV_MSI region.
> This will tell other subsystems that there is no need to map the MSI
> doorbell in the virtio-iommu,
2009 Feb 18
2
[LLVMdev] Parametric polymorphism
> I think the problem is deeper than that, in that LLVM has no official
> concept of a subtype, so I don't see how the idea of polymorphism
> could be defined in it.
Parametric polymorphism is different from subtype polymorphism; you
can have one without the other. Parametric polymorphism just means
that you can use type variables (like T) in the IR, which are later
instantiated
to
2007 May 07
7
A little love for acts_as_taggable #8279
I was working with acts_as_taggable earlier and thought I could make
it a bit friendlier.
I submitted a ticket and patch #8279. Basically, there are three
differences.
1. Fixed the deprecated :dependent => true
2. Added migration generator (it has really specific requirements on
table layout, so might as well generate it).
3. Expanded the README to explain using the migration and to include
2006 May 14
2
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
2018 Mar 23
1
[PATCH 2/4] iommu/virtio: Add probe request
On 14/02/18 14:53, Jean-Philippe Brucker wrote:
> When the device offers the probe feature, send a probe request for each
> device managed by the IOMMU. Extract RESV_MEM information. When we
> encounter a MSI doorbell region, set it up as a IOMMU_RESV_MSI region.
> This will tell other subsystems that there is no need to map the MSI
> doorbell in the virtio-iommu, because MSIs
2006 Mar 19
1
[LLVMdev] Idioms for retrieving global symbols and inheritance
Hello,
I have a couple of doubts, as listed below:
1. To list all the global variables in the module, I am iterating
using type_iterator and for each Type I get, I am using value_iterator
to iterate over Values . In the second iteration I am getting
unexpected results. For each type obtained from type_iterator->second,
value_iterator->first produces the same list as what
2011 Jul 08
0
Looking for Help/Advice on StackOverflow Question - Polymorphic Association with STI
I am having trouble with an many to many polymorphic association with
STI involved. The problem is described clearly in the following
StackOverflow question, so I will leave this thread short:
http://stackoverflow.com/questions/6582074/activerecord-has-many-through-polymorphic-associations-with-sti
I am posting here hoping to get advice/direction/a solution for this,
as I''ve so far been
2010 May 07
1
Can't eagerly load a polymorphic association defined in an STI parent class?
If I define an association (in my case a polymorphic one) in an STI
parent class, and try to eagerly load it in a subclass, I get the
following error:
ActiveRecord::ConfigurationError: Association name ''myassoc'' was not
found; perhaps you misspelled it?
If I redefine the same association again in the STI subclass, it
works.
Is this a bug or what?
--
You received this message
2008 May 12
0
Problems with form_for, STI, and polymorphic routing
I''m stumped on how to get past this. It''s Rails 2.0.2.
I have a class, Show. Using STI, I''m using that as a base class, and
have DayShow and NightShow that inherit from it.
###
class Show < ActiveRecord::Base
end
class DayShow < Show
end
###
In my shows/edit.html.erb, I have:
<% form_for(@show) do |f| %>
However, when I use it with a @show that has
2007 Oct 27
0
STI vs Polymorphic Associations
I have a MasterEvent model. It has attributes that is required by
another model Event. The user selects the MasterEvent model and I
create the Event model by merging the attributes of the selected
MasterEvent with the attributes that were presented for the Event
model in the form.
I have association declarations in the MasterEvent and Event models.
If I use STI does the subclasses inherit the