Commit d79548f2

mo k <mo@mokhan.ca>
2013-02-10 05:11:16
if there is an error creating a tutorial then load the user to be able to render the view template
1 parent c6dff27
Changed files (1)
app/controllers/tutorials_controller.rb
@@ -25,6 +25,7 @@ class TutorialsController < ApplicationController
       if @tutorial.save
         format.html { redirect_to( '/tutorials', :notice => 'the tutorial was successfully added.' ) }
       else
+        @user = current_user
         flash[:error] = @tutorial.errors.full_messages
         format.html { render :action => "new" }
       end