Created
March 26, 2014 14:22
-
-
Save ethicalhack3r/9784512 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PATCH/PUT /submits/1 | |
# PATCH/PUT /submits/1.json | |
def update | |
respond_to do |format| | |
if @submit.status == 'PENDING' | |
if @submit.update(submit_params) | |
format.html { redirect_to @submit, notice: 'Submission was successfully updated.' } | |
format.json { head :no_content } | |
end | |
else | |
format.html { render action: 'edit' } | |
format.json { render json: @submit.errors, status: :unprocessable_entity } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment