diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index 2807b75aa64777a226955b6d8d64b3a6fc9786bb..a0dd7f1a0e54913df2680e7f2739df499569cfb3 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -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 diff --git a/app/controllers/status_messages_controller.rb b/app/controllers/status_messages_controller.rb index 4985a7f52507ac292d81aedf450543af9da86c44..d1549884d64ad05a1f1684cffe7605d7e5e0e9a1 100644 --- a/app/controllers/status_messages_controller.rb +++ b/app/controllers/status_messages_controller.rb @@ -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