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

Fix 500 on tag show with comments

parent c2a4c215
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -3,7 +3,7 @@
-# the COPYRIGHT file.
%li.comment.posted{:data=>{:guid => comment.id}, :class => ("hidden" if(defined? hidden))}
- if current_user.owns?(comment) || current_user.owns?(comment.post)
- if current_user && current_user.owns?(comment) || current_user.owns?(comment.post)
.right.controls
= link_to image_tag('deletelabel.png'), comment_path(comment), :confirm => t('are_you_sure'), :method => :delete, :remote => true, :class => "delete comment_delete", :title => t('delete')
= person_image_link(comment.author)
......
......@@ -41,14 +41,20 @@ describe TagsController do
before do
@post = @user.post(:status_message, :text => "#what", :public => true, :to => 'all')
@user.post(:status_message, :text => "#hello", :public => true, :to => 'all')
get :show, :name => 'what'
end
it "succeeds" do
get :show, :name => 'what'
response.should be_success
end
it "assigns the right set of posts" do
get :show, :name => 'what'
assigns[:posts].should == [@post]
end
it 'succeeds with comments' do
@user.comment('what WHAT!', :on => @post)
get :show, :name => 'what'
response.should be_success
end
end
end
end
......
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