Displaying 4 results from an estimated 4 matches for "shortround".
2006 Jan 03
3
What''s the best way to do complex inheritance?
I have a Merchant class that has many Products. Product is an abstract
class which has many subclasses (ProductA, ProductB, etc). All Products
have common data, like ''name'', ''status'', ''created_on'', etc... but they
also have some completely different properties.
It seems like Active Record only supports Single Table Inheritance.
This
2006 Mar 31
3
Complex Through Statement
Quick Overview:
I have an ''Employee'', some ''Merchants'' and some ''Products''. A
''Merchant'' has many ''Products''. An ''Employee'' has multiple ''Merchants'',
depending on their relationship. For example, the Employee may be the
enrollment contact for one merchant and the
2006 Jun 19
3
can''t dump anonymous class Class
I''m trying to create a document upload system, where most of the code is
the super class Document and just the path to file on the system is
controlled by the sub classes. When I attempt to use my code, I get the
following when I try to save the document.
can''t dump anonymous class Class
Any ideas?
** Migration **
class CreateDocuments < ActiveRecord::Migration
def
2006 Jan 04
1
Multiple Associations With The Same Object
I have a Company object which has multiple Contacts
(has_many/belongs_to) I would like one of the contacts to be the
primary contact. What''s the best way to do this? Right now I have:
create table companies (
id int not null auto_increment,
name varchar(50) not null,
primary_id int null,
constraint fk_company_primary_contact foreign key (primary_id)
references contacts(id),