On 25 Sep 2008, at 11:17, Ad Richards wrote:

>
> Thanks fred,
>
> The problem with creating gradations separately when students complete
> assignments, is that I am then left with no fields in my view in which
> to enter grades. My plan was to have it so that when an assignment was
> created, a corresponding grade field would be created for each student
> containing some kind of default value that could then be edited using
> the inplace edit control.

I think you're solving this the wrong way (for example you're still  
have this problem if you add a new student). I'd worry about working  
around the editing stuff rather than doing this sort of mucking around.
>
>
> I have got as far as making it so that a grade field is automatically
> created for each new assignment:
>
> def create
>    @assignment = Assignment.new(params[:assignment])
>    @gradation = @assignment.gradations.build(params[:gradation])
>
> But I don't know how to pass the student id in so that a new grade  
> field
> is created for each and every existing student...
>
You'd have to do a Student.find :all and loop over all those things

>
>
>
> -- 
> Posted via http://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