# ===== the models... class SalesFact < ActiveRecord::Base belongs_to :address_dimension belongs_to :on_market_date_dimension belongs_to :market, :class_name => 'SaleDateDimension', :foreign_key => 'on_market_date_dimension_id' belongs_to :sale, :class_name => 'SaleDateDimension', :foreign_key => 'sale_date_dimension_id' end
class SaleDateDimension < DateDimension ###has_many :sales_facts has_many :market, :class_name => 'SalesFact' has_many :sale, :class_name => 'SalesFact' end With that defined, in your views, etc., you can say something like x = SalesFact.find(:id) y = x.market.day_name Hope this is what you're looking for. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

