From 4fef3b71721cae0575666692138c66dfe991b758 Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Sat, 25 Jun 2011 16:17:38 -0700 Subject: [PATCH] Docs because I forgot what StatusMessagesController#new is --- app/controllers/status_messages_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/status_messages_controller.rb b/app/controllers/status_messages_controller.rb index d1549884d..2f018766f 100644 --- a/app/controllers/status_messages_controller.rb +++ b/app/controllers/status_messages_controller.rb @@ -12,6 +12,8 @@ class StatusMessagesController < ApplicationController helper_method :object_aspect_ids + # Called when a user clicks "Mention" on a profile page + # @option [Integer] person_id The id of the person to be mentioned def new @person = Person.find(params[:person_id]) @aspect = :profile @@ -82,7 +84,7 @@ class StatusMessagesController < ApplicationController photos.update_all(:status_message_guid => nil) end respond_to do |format| - format.js { + format.js { errors = @status_message.errors.full_messages.collect { |msg| msg.gsub(/^Text/, "") } render :json =>{:errors => errors}, :status => 422 }