Skip to content
Extraits de code Groupes Projets
Valider 1f11e51a rédigé par Maxwell Salzberg's avatar Maxwell Salzberg
Parcourir les fichiers

add object_aspect_ids to status_message controller

parent 41e8a32b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -185,7 +185,7 @@ class PhotosController < ApplicationController
# used on the show page to show which aspects are selected
def object_aspect_ids
if params[:action] == 'show' && parent_aspects = parent.aspects.where(:user_id => current_user.id).all
@object_aspect_ids ||= parent_aspects.map!{|a| a.id}
@object_aspect_ids ||= parent_aspects.map{|a| a.id}
else
super
end
......
......@@ -9,6 +9,9 @@ class StatusMessagesController < ApplicationController
respond_to :mobile
respond_to :json, :only => :show
helper_method :object_aspect_ids
def new
@person = Person.find(params[:person_id])
@aspect = :profile
......@@ -121,4 +124,11 @@ class StatusMessagesController < ApplicationController
end
end
def object_aspect_ids
if params[:action] == 'show'
@object_aspect_ids ||= @status_message.aspects.map{|a| a.id}
else
super
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