search for: current_articl

Displaying 1 result from an estimated 1 matches for "current_articl".

Did you mean: current_article
2006 Jan 30
1
Multiple associations between tables - do they ever work?
...cle", which is a the article that the user is currently viewing/editing. I want to track/save this value, so they can come back to the same article if they log out and back in again. The database tables are set up fairly basically, with user_id as a foreign key in the articles table, and current_article_id as a foreign key in the users table. The model associations are defined as follows: class User < ActiveRecord::Base has_many :articles, :order => "name", :dependent => :delete_all belongs_to :current_article, :class_name => "Article", :foreign_key => &...