Skip to content
Extraits de code Groupes Projets
Valider fe915ecb rédigé par danielgrippi's avatar danielgrippi
Parcourir les fichiers

don't redirect to AspectsController#new from AspectsController#index if no aspect is present

parent 36a9e164
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -18,12 +18,6 @@ class AspectsController < ApplicationController
@aspects = current_user.aspects
@aspects = @aspects.where(:id => params[:a_ids]) if params[:a_ids]
# redirect to aspects creation
if @aspects.blank?
redirect_to new_aspect_path
return
end
@aspect_ids = @aspects.map { |a| a.id }
@posts = current_user.visible_posts(:by_members_of => @aspect_ids,
:type => ['StatusMessage','Reshare', 'ActivityStreams::Photo'],
......
#selected_aspect_contacts.section
.title.no_icon
%h5
- if all_aspects_selected? || @aspect_ids.size > 1
- if all_aspects_selected? || !@aspect || @aspect_ids.size > 1
= "#{t('_contacts')}"
- else
= @aspect.name
= "(#{count})"
.content
- if people.size > 0
- for person in people
......
......@@ -152,18 +152,6 @@ describe AspectsController do
end
end
context 'with no aspects' do
before do
alice.aspects.each { |aspect| aspect.destroy }
alice.reload
end
it 'redirects to the new aspect page' do
get :index
response.should redirect_to new_aspect_path
end
end
context 'with posts in multiple aspects' do
before do
@posts = []
......
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