Permalink
Browse files

forgot some changes in the precedent commit

  • Loading branch information...
1 parent f8d2dfb commit 040943a9367e02a1a93bf2cfc2714975f3a35d4e @thegcat committed Aug 8, 2010
Showing with 2 additions and 0 deletions.
  1. +1 −0 app/controllers/doodles_controller.rb
  2. +1 −0 app/models/doodle.rb
@@ -41,6 +41,7 @@ def create
@doodle = Doodle.new(:project => @project, :author => User.current)
@doodle.attributes = params[:doodle]
@doodle.watcher_user_ids = params[:doodle]['watcher_user_ids']
+ @doodle.should_answer_ids = params[:doodle]['watcher_user_ids']
if @doodle.save
flash[:notice] = l(:notice_successful_create)
redirect_to :action => 'show', :id => @doodle
View
@@ -5,6 +5,7 @@ class Doodle < ActiveRecord::Base
belongs_to :project
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
+ has_and_belongs_to_many :should_answer, :class_name => 'User', :join_table => "#{table_name_prefix}users_should_answer_doodles#{table_name_suffix}"
has_many :comments, :as => :commented, :dependent => :delete_all, :order => "created_on"
has_many :responses, :class_name => 'DoodleAnswers', :dependent => :destroy, :order => "updated_on", :include => [:author]

0 comments on commit 040943a

Please sign in to comment.