add object_aspect_ids to status_message controller
This commit is contained in:
parent
41e8a32b28
commit
1f11e51a9b
2 changed files with 11 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue