Displaying 20 results from an estimated 1000 matches similar to: "object class with STI and Polymorphic Assoc''s."
2006 Sep 03
7
using polymorphic associations with acts_as_list
This is what I have
class Photo < ActiveRecord::Base
belongs_to :image, :polymorphic => true
acts_as_list :scope => image
end
class Place < ActiveRecord::Base
has_many :photos, :as => :image
end
class Child < ActiveRecord::Base
has_many :photos, :as => :image
end
I want to be able to reorder the images. What I need is for the
position of the photos to be set
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
2001 Sep 18
3
OpenSSH linkable library
Has anyone considered making a linkable library of the OpenSSH code so
that one could programatically interact with ssh? Or is there some other
method to accomplish this?
Thanks,
-Eric
2023 Mar 16
1
[libnbd PATCH v4 3/3] lib/utils: add unit test for async-signal-safe assert()
On 3/15/23 18:25, Eric Blake wrote:
> On Wed, Mar 15, 2023 at 12:01:57PM +0100, Laszlo Ersek wrote:
>> Don't try to test async-signal-safety, only that
>> NBD_INTERNAL_FORK_SAFE_ASSERT() works similarly to assert():
>>
>> - it prints diagnostics to stderr,
>>
>> - it calls abort().
>>
>> Some unfortunate gymnastics are necessary to avoid
2015 May 06
2
[LLVMdev] LLD improvement plan
>
> > Linker scripts are worse than everything - except for the alternatives
> that
> > we know about. Any particular suggestions here?
>
> I very much care about the functionality provided by linker scripts (for
> embedded systems and kernel work), but I do agree that most current
> script formats are hard to use, debug, reason about, etc... I have
> often
2020 Aug 05
2
Debugging a potential bug when generating wasm32
Hi,
Sorry if you've seen this message before on llvm.discourse.group or elsewhere --
I've been trying to get to the bottom of this for a while now and asked about
this in a few different platforms before.
I'm currently trying to debug a bug in a LLVM-generated Wasm code. The bug could
be in the code that generates LLVM (rustc) or in the LLVM, I'm not sure yet.
LLVM IR and Wasm
2019 May 21
2
official package lists: the future
On Tue, 2019-05-21 at 17:44 +0100, Rowland penny via samba wrote:
> There was some talk of this happening automatically, but this seems
> to
> have not come to fruition yet.
It has. See the bootstrap/ system in master.
This hasn't been backported to Samba 4.10 however.
The files in generated-dists are intended to be linkable from the wiki
as the definitive list of packages for a
2005 Sep 27
3
Too much recursion
Hey Guys,
I''ve just encountered this error in Firefox will I pulled the latest
scriptaculous rc into project. Sadly, I don''t have a linkable page for
you to look over at the point. My question is what is this error
exactly? My code before this never got it but now it does. My few
searches suggest it''s the browsers way of keeping infinite loops from
happening
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
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
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
2023 Mar 17
1
[libnbd PATCH v4 3/3] lib/utils: add unit test for async-signal-safe assert()
On Thu, Mar 16, 2023 at 10:50:06AM +0100, Laszlo Ersek wrote:
> On 3/15/23 18:25, Eric Blake wrote:
> > On Wed, Mar 15, 2023 at 12:01:57PM +0100, Laszlo Ersek wrote:
> >> Don't try to test async-signal-safety, only that
> >> NBD_INTERNAL_FORK_SAFE_ASSERT() works similarly to assert():
> >>
> >> - it prints diagnostics to stderr,
> >>
>
2017 Jul 01
2
[LLD] Adding WebAssembly support to lld
Hi Sam,
First, I want to know the symbol resolution semantics. I can imagine that
that is set in stone yet, but just that you guys are still discussing what
would be the best semantics or file format for the linkable wasm object
file. I think by knowing more about the format and semantics, we can give
you guys valuable feedback, as we've been actively working on the linker
for a few years
2006 May 31
7
Rails, Transactions, and statements
Hi, I have a problem where I need an auto-incremented id back from the
database for a statement that has yet to be committed. The operation
that uses the id may fail, and if so, I need to rollback the database.
I can''t figure out how to send only the statement to the database
without the commit without sending over hard coded SQL. This is what I
started out with:
1 def add_album
2006 Sep 22
2
possible to create polymorphic relationship with STI models?
I would like to associate a ‘product’ model with 3 models inherited from
‘image’: part, action and accessory.
I have it working with Has_many :through relating products to images
through attachments, I then have to determine the ‘type’ of the STI
extension. This means i have to go product.images. While this is ok, i
can see it getting tricky when i want to go products.images <<
2015 May 06
4
[LLVMdev] LLD improvement plan
On Wed, May 6, 2015 at 6:22 AM, Chris Lattner <clattner at apple.com> wrote:
> On May 5, 2015, at 6:47 PM, Daniel Dilts <diltsman at gmail.com> wrote:
>
> Take a look at how debuggers have migrated through the years. They too
>>
>> used to have their own script format. Now most (all?) popular debuggers
>> do scripting through embedding an actual programming
2018 Sep 26
2
[RFC] Proposal: llvm-tapi, adding YAML/stub generation for ELF linking support
Absolutely. The goal of the tool is to produce both textual and binary
DSO stubs. This means you could take a DSO, produce a textual stub,
modify it however you wish, and then produce a linkable binary stub
from that modified .tbe. That, or you could bypass the textual portion
altogether and just produce binary stubs from DSOs. While the textual
format is useful, the goal is to make the tool
2013 Nov 26
1
[LLVMdev] an option to add bit code to .s or .o
I think it would be interesting to have a compiler option to add the bit
code to the .s or .o file in some kind
of a non linkable section.
This would give you the option at link time of doing lto without having
to change make files, etc.
The driver would need to have some kind of prelink step to extract the
bitcode in the case of lto.
Just a thought...
2008 Oct 02
1
VS2005 build stability?
On Thu, Oct 2, 2008 at 12:30 AM, Erik de Castro Lopo
<mle+la at mega-nerd.com<mle%2Bla at mega-nerd.com>
> wrote:
> Keith Kyzivat wrote:
>
> > And Alex has told me that visual studio-built projects cannot link with
> > mingw-win32-gcc produced DLLs...
>
> This is only true when the DLL being called exports C++ name mangled
> symbols.
Is there a way to get