Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed issue when trying to update published crash

  • Loading branch information...
commit 571add1bb4b388044522f75728f35d18b93476b5 1 parent 38a1bee
@robdimarco authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  app/controllers/quizzes_controller.rb
View
2  app/controllers/quizzes_controller.rb
@@ -137,7 +137,7 @@ def update
redirect_to root_path and return unless @quiz and @quiz.owner == current_user
Rails.logger.debug "Processing action #{action}!"
respond_to do |format|
- if @quiz.send :"#{action}!"
+ if (@quiz.send(:"#{action}?") ? @quiz.save : @quiz.send(:"#{action}!"))
format.html { redirect_to(@quiz, :notice => "Quiz was successfully #{action}ed.") }
format.xml { head :ok }
else
Please sign in to comment.
Something went wrong with that request. Please try again.