search for: points_to

Displaying 3 results from an estimated 3 matches for "points_to".

Did you mean: pointerto
2006 Apr 07
4
belongs_to and lookup tables
I have two classes, Listing and Warranty. A Listing (think of it as a product) may or may not have a Warranty from a lookup table. When I want the Warranty.company for a given Listing I want to say the following: @listing = Listing.find(4) @company = @listing.warranty.company In order to do that I did the following: class Listing < ActiveRecord::Base belongs_to :warranty end and
2006 Feb 25
7
Help with DRY: too much code in my view
I''m a newbie to rails, and really to the whole DRY and MVC thing as well, except where I accidentally fell into things doing it my own way in the past. I''ve got a fairly complex DB structure I want to create an interface for using Rails. Getting simple tables to display, edit, save, not too much problem there. But where I''m having trouble is figuring out where to
2006 Apr 07
2
has_one not using the pk?
Hello, im trying to wrap a fairly ugly legacy schema using AR. How to handle normalized informations which aren''t connected via the pk? create table what ( myid int, myclass int, ;; references blahclass.blahid mygender int ) create table blahclass ( blahid int, mdesc1 text, fdesc1 text) ) I would like to wrap this as class What < AR::Base has_one :blahclass class