Displaying 3 results from an estimated 3 matches for "participant_ids".
Did you mean:
participant_id
2013 Feb 08
1
Problem with many to many relationship
Hi
I''m trying to create a many to many relationship between two models.
A User can be associated with many Incidents and vice versa.
class User < ActiveRecord::Base
include ActiveModel::ForbiddenAttributesProtection
has_many :incident_participants, foreign_key: "participant_id"
has_many :participated_incidents, through: :incident_participants
end
class Incident
2009 May 12
4
has_many :through and scopes: how to mutate the set of associated objects?
...d my scope trickery doesn''t make it any better.
Now, let''s assume for a moment that participants was a plain has_many
association. Then it would be possible to write things like
m.participants.clear
m.participants << Person.find_by_name(''Steve McKing'')
m.participant_ids = params[:movie][:participants]
With the given has_many :through, none of these work, as Role object
won''t validate without a role type. Anyway, what I would like to write
is
m.participants.as(''actor'').clear
m.participants.as(''actor'') << Person...
2009 Apr 01
1
Help with mixed-effects model with temporal pseudoreplication!
Sorry if this is the wrong ml for this question, I am new to R. I am
trying to use R to analyze the data from my thesis experiment and I am
having troubles accounting for the pseudoreplication properly from
having each participant repeat each treatment combination (combination
of fixed factors) 5 times. The design of the experiment is as
follows...
Responses:
CompletionTIme
VisitedTargets