How does the controller get the grade created in the view then? And why wouldn't creating it in the controller make it happen once for each assignment?

    —
Sent from Mailbox for iPhone

On Mon, Sep 9, 2013 at 11:48 AM, Cory Kaufman-Schofield
<notifications@github.com> wrote:

>> @@ -52,8 +52,9 @@
>>              - if assignment.is_required?
>>                %span.label.label-important Required!
>>              - if assignment.self_gradeable?
>> -              //= simple_form_for([assignment, grade], :html => {:class => 'form-horizontal' }) do |f|
>> -              //= f.button :submit, "Submit", :input_html => { :type => "button", :class => "btn btn-primary btn-tiny", "data-toggle" => "button" }
>> +              - grade = assignment.grades.first_or_initialize(student: @user)
>> +              = simple_form_for([assignment, grade], :url => self_log_create_assignment_grades_path(:assignment_id => assignment.id, :grade => grade), :method => :post, :html => {:class => 'form-horizontal' }) do |f|
> You don't need to pass `grade` to `self_log_create_assignment_grades_path`. It doesn't have an id yet, so all that's needed is the assignment id.
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/bellotastudios/gradecraft-development/pull/314/files#r6241311