Skip to content
Extraits de code Groupes Projets
Valider 5e393684 rédigé par Raphael Sofaer's avatar Raphael Sofaer
Parcourir les fichiers

Get rid of 500 on mobile comment creation

parent 6946d282
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -28,7 +28,7 @@ class CommentsController < ApplicationController
respond_to do |format|
format.js{ render(:create, :status => 201)}
format.html{ render :nothing => true, :status => 201 }
format.mobile{ redirect_to @comment.post }
format.mobile{ redirect_to post_url(@comment.post) }
end
else
render :nothing => true, :status => 422
......
......@@ -29,6 +29,10 @@ describe CommentsController do
response.code.should == '201'
response.body.should match comment_hash[:text]
end
it 'responds to format mobile' do
post :create, comment_hash.merge(:format => 'mobile')
response.should be_redirect
end
end
context "on a post from a contact" do
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter