Displaying 2 results from an estimated 2 matches for "date_due".
Did you mean:
date_date
2006 Apr 06
4
using two foreign keys to the same table
...ds that say user_id in my tasks table, so how do i
get them to link right and specify a different field?
here is my current database schema:
_Tasks_
id int not null auto_increment,
task_name varchar(100) not null,
description text not null,
user_id int not null,
assignee int not null,
date_due date not null,
completed_at datetime not null,
constraint fk_task_user foreign key (user_id) references users(id),
constraint fk_task_assignee foreign key (assignee) references
users(id),
_Users_
id int not null auto_increment,
username varchar(20) not null,
password varchar(20) not n...
2006 Jun 27
2
how to use scope with acts_as_list
...:foreign_key => ''assignee_id''
belongs_to :creator,
:class_name => ''User'',
:foreign_key => ''creator_id''
has_many :comments, :dependent => destroy
validates_presence_of :title, :description, :date_due
acts_as_list :scope => :assignee
end
and this is what i have in my User model:
class User < ActiveRecord::Base
has_many :assigned,
:class_name => ''Task'',
:foreign_key => ''assignee_id''
has_many :created,
:clas...