Skip to content

Instantly share code, notes, and snippets.

@pupca
Created June 20, 2014 13:34
Show Gist options
  • Select an option

  • Save pupca/478365a131aba6690022 to your computer and use it in GitHub Desktop.

Select an option

Save pupca/478365a131aba6690022 to your computer and use it in GitHub Desktop.
respond_to do |format|
if @subscription.save
format.html { redirect_to new_project_path, notice: 'Subscription was successfully created.' }
format.json { render action: 'show', status: :created, location: @subscription }
else
format.html { render action: 'new' }
format.json { render json: @subscription.errors, status: :unprocessable_entity }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment