On Sep 24, 11:38 pm, Ad Richards <[EMAIL PROTECTED]>
wrote:

> Okay thanks,
>
> I have tried the following in my gradations controller;
>
> def create
>       [EMAIL PROTECTED] = Assignment.new(params[:assignment])
>       [EMAIL PROTECTED] = Gradation.new(params[:gradation])
>
> But it doesn't seem to work. I know I need to link the two together but
> am not sure how.

How on would you expect that to work ? Nothing's going to guess that
two things are related because they are performed in quick succession.

Either you explicitly create the relationship (ie
@gradation.assignment = ...) or you do it implicitly
(@gradation.build_assignment(...)) It might make more sense to do
things the other way round in your case, but that's for you to
determine (although from your description previously I would have
expected you to be creating assignments over in one corner of the app,
and the creating gradations in a separate part, as and when students
complete assignments - not create both at the same time)

Fred

> Any ideas?
>
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to